當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。