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


C# IObjectValueSource类代码示例

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


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

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

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

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

示例5: CreatePrimitive

		public static ObjectValue CreatePrimitive (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags)
		{
			ObjectValue ob = Create (source, path, typeName);
			ob.flags = flags | ObjectValueFlags.Primitive;
			ob.value = value.Value;
			ob.displayValue = value.DisplayValue;
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:ObjectValue.cs

示例6: CreateNotSupported

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

示例7: CreateEvaluationException

        public static ObjectValue CreateEvaluationException(EvaluationContext ctx, IObjectValueSource source, ObjectPath path, EvaluatorExceptionThrownException exception,
			ObjectValueFlags flags = ObjectValueFlags.None)
        {
            var error = CreateError (source, path, exception.ExceptionTypeName, "Exception was thrown", flags);
            var exceptionReference = LiteralValueReference.CreateTargetObjectLiteral (ctx, "Exception", exception.Exception);
            var exceptionValue = exceptionReference.CreateObjectValue (ctx.Options);
            error.children = new List<ObjectValue> {exceptionValue};
            return error;
        }
开发者ID:nerzhulart,项目名称:debugger-libs,代码行数:9,代码来源:ObjectValue.cs

示例8: CreateError

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

示例9: CreateImplicitNotSupported

		public static ObjectValue CreateImplicitNotSupported (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
		{
			return CreateNotSupported (source, path, typeName, "Implicit evaluation is disabled", flags);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:4,代码来源:ObjectValue.cs

示例10: CreateNotSupported

 public static ObjectValue CreateNotSupported(IObjectValueSource source, ObjectPath path, string typeName, string message, ObjectValueFlags flags)
 {
     var val = Create (source, path, typeName);
     val.flags = flags | ObjectValueFlags.NotSupported;
     val.value = message;
     return val;
 }
开发者ID:nerzhulart,项目名称:debugger-libs,代码行数:7,代码来源:ObjectValue.cs

示例11: CreateError

 public static ObjectValue CreateError(IObjectValueSource source, ObjectPath path, string typeName, string value, ObjectValueFlags flags)
 {
     var val = Create (source, path, typeName);
     val.flags = flags | ObjectValueFlags.Error;
     val.value = value;
     return val;
 }
开发者ID:nerzhulart,项目名称:debugger-libs,代码行数:7,代码来源:ObjectValue.cs

示例12: CreateNullObject

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

示例13: CreateNullObject

		public static ObjectValue CreateNullObject (IObjectValueSource source, string name, string typeName, ObjectValueFlags flags)
		{
			return CreateNullObject (source, new ObjectPath (name), typeName, flags);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:4,代码来源:ObjectValue.cs

示例14: MtaObjectValueSource

		public MtaObjectValueSource (IObjectValueSource s)
		{
			source = s;
		}
开发者ID:mono,项目名称:monodevelop,代码行数:4,代码来源:MtaObjectValueSource.cs

示例15: CreateObjectValueImpl

		protected override ObjectValue CreateObjectValueImpl (EvaluationContext gctx, IObjectValueSource source, ObjectPath path, object vobj, ObjectValueFlags flags)
		{
			MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
			TargetObject obj = ctx.GetRealObject (vobj);
			
			if (obj == null)
				return ObjectValue.CreateObject (null, path, "", "", flags | ObjectValueFlags.ReadOnly, null);

			if (obj.HasAddress && obj.GetAddress (ctx.Thread).IsNull)
				return ObjectValue.CreateObject (null, path, obj.TypeName, ctx.Evaluator.ToExpression (ctx, null), flags, null);
			
			switch (obj.Kind) {
				
				case TargetObjectKind.Struct:
				case TargetObjectKind.GenericInstance:
				case TargetObjectKind.Class:
				case TargetObjectKind.Array:
				case TargetObjectKind.Fundamental:
				case TargetObjectKind.Enum:
					return base.CreateObjectValueImpl (gctx, source, path, vobj, flags);
					
				case TargetObjectKind.Object:
					TargetObjectObject oob = obj as TargetObjectObject;
					if (oob == null)
						return ObjectValue.CreateUnknown (path.LastName);
					else
						return ObjectValue.CreateObject (source, path, obj.TypeName, Server.Instance.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
					
				case TargetObjectKind.Pointer:
					return ObjectValue.CreateObject (source, path, obj.TypeName, Server.Instance.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
					
				case TargetObjectKind.Nullable:
					TargetNullableObject tn = (TargetNullableObject) obj;
					if (tn.HasValue (ctx.Thread)) {
						ObjectValue val = CreateObjectValue (ctx, source, path, tn.GetValue (ctx.Thread), flags);
						val.TypeName = obj.TypeName;
						return val;
					}
					else {
						flags |= ObjectValueFlags.Primitive;
						return ObjectValue.CreateObject (source, path, obj.TypeName, ctx.Evaluator.ToExpression (ctx, null), flags, new ObjectValue [0]);
					}
				default:
					return ObjectValue.CreateFatalError (path.LastName, "Unknown value type: " + obj.Kind, flags);
			}
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:46,代码来源:MdbObjectValueAdaptor.cs


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