当前位置: 首页>>代码示例>>C#>>正文


C# ObjectPath.Join方法代码示例

本文整理汇总了C#中Mono.Debugging.Client.ObjectPath.Join方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectPath.Join方法的具体用法?C# ObjectPath.Join怎么用?C# ObjectPath.Join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mono.Debugging.Client.ObjectPath的用法示例。


在下文中一共展示了ObjectPath.Join方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetChildren

        public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options)
        {
            List<ObjectValue> children = new List<ObjectValue> ();
            session.SelectThread (threadId);
            NodeCommandResult res = session.RunCommand ("-var-list-children", "2", path.Join ("."));
            ResultData cdata = res.GetObject ("children");

            // The response may not contain the "children" list at all.
            if (cdata == null)
                return children.ToArray ();

            if (index == -1) {
                index = 0;
                count = cdata.Count;
            }

            for (int n=index; n<cdata.Count && n<index+count; n++) {
                ResultData data = cdata.GetObject (n);
                ResultData child = data.GetObject ("child");

                string name = child.GetValue ("exp");
                if (name.Length > 0 && char.IsNumber (name [0]))
                    name = "[" + name + "]";

                // C++ structures may contain typeless children named
                // "public", "private" and "protected".
                if (child.GetValue("type") == null) {
                    ObjectPath childPath = new ObjectPath (child.GetValue ("name").Split ('.'));
                    ObjectValue[] subchildren = GetChildren (childPath, -1, -1, options);
                    children.AddRange(subchildren);
                } else {
                    ObjectValue val = CreateObjectValue (name, child);
                    children.Add (val);
                }
            }
            return children.ToArray ();
        }
开发者ID:atsushieno,项目名称:md-typescript,代码行数:37,代码来源:NodeBacktrace.cs

示例2: GetChildren

        public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options)
        {
            List<ObjectValue> children = new List<ObjectValue>();
            session.SelectThread(threadId);

            string expression = path.Join(".");

            if (expression.Trim().Length == 0)
                return children.ToArray();

            List<DebugScopedSymbol> childSymbols = this.session.SymbolResolver.GetChildSymbols(expression);
            if (childSymbols.Count == 0)
                return children.ToArray();

            for (int i = 0; i < childSymbols.Count; i++)
            {
                DebugScopedSymbol child = childSymbols[i];

                ObjectValue ov = CreateObjectValue(child);
                children.Add(ov);
            }

            return children.ToArray();
        }
开发者ID:Kentorix,项目名称:monodevelop-win32-debugger,代码行数:24,代码来源:DDebugBacktrace.cs

示例3: SetValue

		public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
		{
			session.SelectThread (threadId);
			session.RunCommand ("-var-assign", path.Join ("."), value);
			return new EvaluationResult (value);
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:6,代码来源:GdbBacktrace.cs

示例4: HasChildren

		public bool HasChildren (ObjectPath path, EvaluationOptions options)
		{
			session.SelectThread (threadId);
			GdbCommandResult res = session.RunCommand ("-var-info-num-children", path.Join ("."));

			return res.GetInt ("numchild") > 0;
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:7,代码来源:GdbBacktrace.cs


注:本文中的Mono.Debugging.Client.ObjectPath.Join方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。