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


C# Client.EvaluationOptions类代码示例

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


EvaluationOptions类属于Mono.Debugging.Client命名空间,在下文中一共展示了EvaluationOptions类的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: GetLocalVariables

		public ObjectValue[] GetLocalVariables(int frameIndex, EvaluationOptions options)
		{
			List<ObjectValue> values = new List<ObjectValue>();
			if (Engine.Symbols.ScopeLocalSymbols == null)
				return values.ToArray();

			for (uint i = 0; i < Engine.Symbols.ScopeLocalSymbols.Count; i++)
			{
				if (Engine.Symbols.ScopeLocalSymbols.Symbols[i].Parent != null)
					continue;

				string name = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Name;
				string typename = Engine.Symbols.ScopeLocalSymbols.Symbols[i].TypeName;
				string val = Engine.Symbols.ScopeLocalSymbols.Symbols[i].TextValue;
				ulong offset = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Offset;
				DEW.DebugScopedSymbol parentSymbol = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Parent;

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

				if (ov != null)
					values.Add(ov);
			}
			return values.ToArray();
		}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:29,代码来源:DDebugBacktrace.cs

示例3: CallMethod

		public object CallMethod (string name, object[] parameters, out object[] outArgs, EvaluationOptions options)
		{
			object[] tempOutArgs = null;
			var result = MtaThread.Run (() => source.CallMethod (name, parameters, out tempOutArgs, options));
			outArgs = tempOutArgs;
			return result;
		}
开发者ID:mono,项目名称:monodevelop,代码行数:7,代码来源:MtaRawValue.cs

示例4: GetAllLocals

 public ObjectValue[] GetAllLocals(int frameIndex, EvaluationOptions options)
 {
     List<ObjectValue> locals = new List<ObjectValue> ();
     locals.AddRange (GetParameters (frameIndex, options));
     locals.AddRange (GetLocalVariables (frameIndex, options));
     return locals.ToArray ();
 }
开发者ID:atsushieno,项目名称:md-typescript,代码行数:7,代码来源:NodeBacktrace.cs

示例5: GetParameters

		public ObjectValue[] GetParameters(int frameIndex, EvaluationOptions options)
		{
			List<ObjectValue> values = new List<ObjectValue>();

			SelectFrame(frameIndex);

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

示例6: GetException

        public override ExceptionInfo GetException(int frameIndex, EvaluationOptions options)
        {

            ObjectValue val = CreateExceptionObject(exceptionRecord);
            ExceptionInfo result = new ExceptionInfo(val);

            return result;
        }
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:8,代码来源:DDebugBacktrace.cs

示例7: SetMemberValue

		public void SetMemberValue (string name, object value, EvaluationOptions options)
		{
			EvaluationContext localContext = ctx.WithOptions (options);
			object type = localContext.Adapter.GetValueType (localContext, targetObject);
			ValueReference val = localContext.Adapter.GetMember (localContext, source, type, targetObject, name);
			if (val == null)
				throw new EvaluatorException ("Member '{0}' not found", name);
			val.Value = localContext.Adapter.FromRawValue (localContext, value);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:9,代码来源:RemoteRawValue.cs

示例8: GetExpressionValues

		public ObjectValue[] GetExpressionValues(int frameIndex, string[] expressions, EvaluationOptions options)
		{
			List<ObjectValue> values = new List<ObjectValue>();

			SelectFrame(frameIndex);
			foreach (string exp in expressions)
				values.Add(CreateVarObject(exp));
			return values.ToArray();
		}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:9,代码来源:DDebugBacktrace.cs

示例9: WithOptions

		public EvaluationContext WithOptions (EvaluationOptions options)
		{
			if (options == null || Options == options)
				return this;

			EvaluationContext clone = Clone ();
			clone.Options = options;
			return clone;
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:9,代码来源:EvaluationContext.cs

示例10: GetLocalVariables

		public ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options)
		{
			List<ObjectValue> values = new List<ObjectValue> ();
			SelectFrame (frameIndex);
			
			GdbCommandResult res = session.RunCommand ("-stack-list-locals", "0");
			foreach (ResultData data in res.GetObject ("locals"))
				values.Add (CreateVarObject (data.GetValue ("name")));
			
			return values.ToArray ();
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:11,代码来源:GdbBacktrace.cs

示例11: CreateObjectValue

		public ObjectValue CreateObjectValue (bool withTimeout, EvaluationOptions options)
		{
			if (!CanEvaluate (options))
				return DC.ObjectValue.CreateImplicitNotSupported (this, new ObjectPath (Name), ctx.Adapter.GetTypeName (GetContext (options), Type), Flags);
			if (withTimeout) {
				return ctx.Adapter.CreateObjectValueAsync (Name, Flags, delegate {
					return CreateObjectValue (options);
				});
			} else
				return CreateObjectValue (options);
		}
开发者ID:teast,项目名称:monodevelop,代码行数:11,代码来源:ValueReference.cs

示例12: GetMemberValue

        public object GetMemberValue(string name, EvaluationOptions options)
        {
            var localContext = ctx.WithOptions (options);
            var type = localContext.Adapter.GetValueType (localContext, targetObject);
            var val = localContext.Adapter.GetMember (localContext, source, type, targetObject, name);

            if (val == null)
                throw new EvaluatorException ("Member '{0}' not found", name);

            return localContext.Adapter.ToRawValue (localContext, val, val.Value);
        }
开发者ID:peterdocter,项目名称:debugger-libs,代码行数:11,代码来源:RemoteRawValue.cs

示例13: GetChild

		public override ValueReference GetChild (string name, EvaluationOptions options)
		{
			string newNs = namspace + "." + name;

			var ctx = GetContext (options);
			var type = ctx.Adapter.GetType (ctx, newNs);

			if (type != null)
				return new TypeValueReference (ctx, type);
			
			return new NamespaceValueReference (ctx, newNs);
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:12,代码来源:NamespaceValueReference.cs

示例14: CallMethod

		public object CallMethod (string name, object[] parameters, EvaluationOptions options)
		{
			EvaluationContext localContext = ctx.WithOptions (options);
			
			object[] argValues = new object [parameters.Length];
			object[] argTypes = new object [parameters.Length];
			for (int n=0; n<argValues.Length; n++) {
				argValues[n] = localContext.Adapter.FromRawValue (localContext, parameters[n]);
				argTypes[n] = localContext.Adapter.GetValueType (localContext, argValues[n]);
			}
			object type = localContext.Adapter.GetValueType (localContext, targetObject);
			object res = localContext.Adapter.RuntimeInvoke (localContext, type, targetObject, name, argTypes, argValues);
			return localContext.Adapter.ToRawValue (localContext, null, res);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:14,代码来源:RemoteRawValue.cs

示例15: GetAllLocals

        public ObjectValue[] GetAllLocals(int frameIndex, EvaluationOptions options)
        {
            session.RunCommand (true, "vars");
            List<ObjectValue> locals = new List<ObjectValue> ();
            lock (syncLock) {
                foreach (string varName in session.lastResult.vars) {
                    ObjectValue val;
                    ObjectValueFlags flags = ObjectValueFlags.Variable;
                    val = ObjectValue.CreatePrimitive (this, new ObjectPath (varName), "dummyInt", new EvaluationResult ("test_val"), flags);
                    val.Name = varName;
                    locals.Add (val);
                }
            }

            return locals.ToArray ();
        }
开发者ID:profelis,项目名称:md-haxebinding,代码行数:16,代码来源:HxcppBacktrace.cs


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