示例#1
0
        ///////////////////////////////////////////////////////////////////////

        public StringPairList ToList(
            DetailFlags detailFlags
            )
        {
            CheckDisposed();

            StringPairList list = new StringPairList();

            bool all = FlagOps.HasFlags(
                detailFlags, DetailFlags.ICallFrameToListAll, true);

            list.Add("flags", flags.ToString());

            if (all)
            {
                list.Add("frameId", frameId.ToString());
                list.Add("frameLevel", frameLevel.ToString());
            }

            if (name != null)
            {
                list.Add("name", (name != null) /* REDUNDANT */ ?
                         name : _String.Null);
            }

            if (all)
            {
                if ((tags != null) && (tags.Count > 0))
                {
                    list.Add("tags", (tags != null) /* REDUNDANT */ ?
                             tags.ToString() : _String.Null);
                }
            }

            if ((variables != null) && (variables.Count > 0))
            {
                list.Add("vars", (variables != null) /* REDUNDANT */ ?
                         variables.Count.ToString() : _String.Null);
            }

            if ((arguments != null) && (arguments.Count > 0))
            {
                list.Add("args", (arguments != null) /* REDUNDANT */ ?
                         arguments.Count.ToString() : _String.Null);
            }

            if (all)
            {
                list.Add("ownArgs", ownArguments.ToString());
            }

            if ((procedureArguments != null) && (procedureArguments.Count > 0))
            {
                list.Add("procArgs",
                         (procedureArguments != null) /* REDUNDANT */ ?
                         procedureArguments.Count.ToString() : _String.Null);
            }

            if (all)
            {
                list.Add("index", index.ToString());
            }

            list.Add("level", level.ToString());

            return(list);
        }