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


C# Client.ObjectPath类代码示例

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


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

示例1: GetChildren

		public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
		{
			EvaluationContext cctx = ctx.WithOptions (options);
			var names = new ObjectValueNameTracker (cctx);
			object tdataType = null;
			TypeDisplayData tdata = null;
			List<ObjectValue> list = new List<ObjectValue> ();
			foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
				object decType = val.DeclaringType;
				if (decType != null && decType != tdataType) {
					tdataType = decType;
					tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
				}
				DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
				if (state == DebuggerBrowsableState.Never)
					continue;
				ObjectValue oval = val.CreateObjectValue (options);
				names.FixName (val, oval);
				list.Add (oval);
			}
			if ((bindingFlags & BindingFlags.NonPublic) == 0) {
				BindingFlags newFlags = bindingFlags | BindingFlags.NonPublic;
				newFlags &= ~BindingFlags.Public;
				list.Add (CreateNonPublicsNode (cctx, objectSource, type, obj, newFlags));
			}
			return list.ToArray ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:27,代码来源:FilteredMembersSource.cs

示例2: Create

		static ObjectValue Create (IObjectValueSource source, ObjectPath path, string typeName)
		{
			var val = new ObjectValue ();
			val.typeName = typeName;
			val.source = source;
			val.path = path;
			return val;
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:8,代码来源:ObjectValue.cs

示例3: Create

		static ObjectValue Create (IObjectValueSource source, ObjectPath path, string typeName)
		{
			ObjectValue ob = new ObjectValue ();
			ob.source = source;
			ob.path = path;
			ob.typeName = typeName;
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:ObjectValue.cs

示例4: CreateElementValue

		public ObjectValue CreateElementValue (ArrayElementGroup grp, ObjectPath path, int[] indices)
		{
			if (array != null) {
				CorValRef elem = (CorValRef) GetElement (indices);
				return ctx.Adapter.CreateObjectValue (ctx, grp, path, elem, ObjectValueFlags.ArrayElement);
			}
			else
				return ObjectValue.CreateUnknown ("?");
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:9,代码来源:ArrayAdaptor.cs

示例5: CreateObjectValue

		public ObjectValue CreateObjectValue (EvaluationContext ctx, IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
		{
			try {
				return CreateObjectValueImpl (ctx, source, path, obj, flags);
			} catch (Exception ex) {
				ctx.WriteDebuggerError (ex);
				return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
			}
		}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:9,代码来源:ObjectValueAdaptor.cs

示例6: CreateObject

		public static ObjectValue CreateObject (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags, ObjectValue[] children)
		{
			ObjectValue ob = Create (source, path, typeName);
			ob.path = path;
			ob.flags = flags | ObjectValueFlags.Object;
			ob.value = value.Value;
			ob.displayValue = value.DisplayValue;
			if (children != null) {
				ob.children = new List<ObjectValue> ();
				ob.children.AddRange (children);
			}
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:13,代码来源:ObjectValue.cs

示例7: GetChildren

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

            if (Engine.Symbols.ScopeLocalSymbols == null)
                return children.ToArray();

            DEW.DebugScopedSymbol parent = null;

            for (uint i = 0; i < Engine.Symbols.ScopeLocalSymbols.Symbols.Length; i++)
            {
                DEW.DebugScopedSymbol symbol = Engine.Symbols.ScopeLocalSymbols.Symbols[i];
                if (symbol.Name == path.LastName)
                {
                    parent = symbol;
                    break;
                }
            }

            if (parent == null || parent.ChildrenCount == 0)
                return children.ToArray();

            for (uint i = 0; i < parent.ChildrenCount; i++)
            {

                DEW.DebugScopedSymbol child = parent.Children[i];

                string name = child.Name;
                string typename = child.TypeName;
                string val = child.TextValue;
                ulong offset = child.Offset;

                ObjectValue ov = symbolResolver.Resolve(offset, name, typename, val, child.Parent);
                if (ov == null)
                {
                    ObjectValueFlags flags = ObjectValueFlags.Variable;
                    ov = ObjectValue.CreatePrimitive(this, new ObjectPath(name), typename, new EvaluationResult(val), flags);
                }

                if (ov != null)
                    children.Add(ov);
            }

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

示例8: GetChildren

		public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
		{
			var node = cacheRoot [path];

			if(node == null)
				return Backtrace.GetChildren(path, index, count, options);

			ObjectValue[] children;
			var t = node.NodeType;

			if (t is ArrayType)
				children = GetArrayChildren (node, path, index, count, options);
			else if (t is ClassType || t is StructType)
				children = GetClassInstanceChildren (node, path, options);
			else
				children = new ObjectValue[0];

			return children;
		}
开发者ID:llucenic,项目名称:MonoDevelop.Debugger.Gdb.D,代码行数:19,代码来源:VariableValueExamination.cs

示例9: GetChildren

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

            /*
            DDebugCommandResult 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:nazriel,项目名称:Mono-D,代码行数:41,代码来源:DDebugBacktrace.cs

示例10: HasChildren

		public bool HasChildren (ObjectPath path, EvaluationOptions options)
		{
			EvaluationContext cctx = ctx.WithOptions (options);
			TypeDisplayData tdata = null;
			object tdataType = null;

			foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
				object decType = val.DeclaringType;
				if (decType != null && decType != tdataType) {
					tdataType = decType;
					tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
				}

				DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
				if (state == DebuggerBrowsableState.Never)
					continue;

				return true;
			}

			return false;
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:22,代码来源:FilteredMembersSource.cs

示例11: 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

示例12: CreateUnknown

		public static ObjectValue CreateUnknown (IObjectValueSource source, ObjectPath path, string typeName)
		{
			ObjectValue ob = Create (source, path, typeName);
			ob.flags = ObjectValueFlags.Unknown | ObjectValueFlags.ReadOnly;
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:6,代码来源:ObjectValue.cs

示例13: SetRawValue

		public override void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
		{
			if (value is RawValue || value is RawValueArray || value is Array) {
				base.SetRawValue (path, value, options);
				return;
			}
			
			AppDomainMirror domain = null;
			if (null != obj && obj is ObjectMirror)
				domain = ((ObjectMirror)obj).Domain;
			Value = ((SoftDebuggerAdaptor)Context.Adapter).CreateValue (Context, value, domain);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:12,代码来源:FieldValueReference.cs

示例14: CreateNullObject

		public static ObjectValue CreateNullObject (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
		{
			ObjectValue ob = Create (source, path, typeName);
			ob.flags = flags | ObjectValueFlags.Object;
			ob.value = "(null)";
			ob.isNull = true;
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:ObjectValue.cs

示例15: SetValue

		public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
		{
			return MtaThread.Run (() => source.SetValue (path, value, options));
		}
开发者ID:mono,项目名称:monodevelop,代码行数:4,代码来源:MtaObjectValueSource.cs


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