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


C# ObjectValueFlags类代码示例

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


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

示例1: GetFlags

		internal static ObjectValueFlags GetFlags (PropertyInfoMirror property, MethodMirror getter)
		{
			var flags = ObjectValueFlags.Property;

			if (property.GetSetMethod (true) == null)
				flags |= ObjectValueFlags.ReadOnly;

			if (getter.IsStatic)
				flags |= ObjectValueFlags.Global;

			if (getter.IsPublic)
				flags |= ObjectValueFlags.Public;
			else if (getter.IsPrivate)
				flags |= ObjectValueFlags.Private;
			else if (getter.IsFamily)
				flags |= ObjectValueFlags.Protected;
			else if (getter.IsFamilyAndAssembly)
				flags |= ObjectValueFlags.Internal;
			else if (getter.IsFamilyOrAssembly)
				flags |= ObjectValueFlags.InternalProtected;

			if (property.DeclaringType.IsValueType)
				flags |= ObjectValueFlags.ReadOnly; // Setting property values on structs is not supported by sdb

			return flags;
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:26,代码来源:PropertyValueReference.cs

示例2: VariableValueReference

		public VariableValueReference (EvaluationContext ctx, CorValRef var, string name, ObjectValueFlags flags)
			: base (ctx)
		{
			this.flags = flags;
			this.var = var;
			this.name = name;
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:7,代码来源:VariableValueReference.cs

示例3: PropertyValueReference

		public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, Value[] indexerArgs): base (ctx)
		{
			this.property = property;
			this.obj = obj;
			this.declaringType = declaringType;
			this.indexerArgs = indexerArgs;
			flags = ObjectValueFlags.Property;
			if (property.GetSetMethod (true) == null)
				flags |= ObjectValueFlags.ReadOnly;
			MethodMirror getter = property.GetGetMethod (true);
			if (getter.IsStatic)
				flags |= ObjectValueFlags.Global;
			if (getter.IsPublic)
				flags |= ObjectValueFlags.Public;
			else if (getter.IsPrivate)
				flags |= ObjectValueFlags.Private;
			else if (getter.IsFamily)
				flags |= ObjectValueFlags.Protected;
			else if (getter.IsFamilyAndAssembly)
				flags |= ObjectValueFlags.Internal;
			else if (getter.IsFamilyOrAssembly)
				flags |= ObjectValueFlags.InternalProtected;
			if (property.DeclaringType.IsValueType)
				flags |= ObjectValueFlags.ReadOnly; // Setting property values on structs is not supported by sdb
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:25,代码来源:PropertyValueReference.cs

示例4: Run

		public ObjectValue Run (string name, ObjectValueFlags flags, ObjectEvaluatorDelegate evaluator)
		{
			string id;
			int tid;
			lock (asyncCallbacks) {
				tid = asyncCounter++;
				id = tid.ToString ();
			}
			
			ObjectValue val = null;
			bool done = runner.Run (delegate {
					if (tid >= cancelTimestamp)
						val = evaluator ();
			},
			delegate {
				if (tid >= cancelTimestamp)
					OnEvaluationDone (id, val);
			});
			
			if (done) {
				// 'val' may be null if the timed evaluator is disposed while evaluating
				return val ?? ObjectValue.CreateUnknown (name);
			}

			return ObjectValue.CreateEvaluating (this, new ObjectPath (id, name), flags);
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:26,代码来源:AsyncEvaluationTracker.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: FieldReference

		public FieldReference (EvaluationContext ctx, CorValRef thisobj, CorType type, FieldInfo field, string vname, ObjectValueFlags vflags) : base (ctx)
		{
			this.thisobj = thisobj;
			this.type = type;
			this.field = field;
			this.vname = vname;
			if (field.IsStatic)
				this.thisobj = null;

			flags = vflags | GetFlags (field);

			loader = delegate {
				return ((CorValRef)Value).Val;
			};
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:15,代码来源:FieldReference.cs

示例8: FieldValueReference

		public FieldValueReference (EvaluationContext ctx, FieldInfoMirror field, object obj, TypeMirror declaringType, string vname, ObjectValueFlags vflags): base (ctx)
		{
			this.field = field;
			this.obj = obj;
			this.declaringType = declaringType;
			this.vname = vname;
			flags = vflags;

			if (field.IsStatic)
				this.obj = null;

			flags |= GetFlags (field);

			if (obj is PrimitiveValue)
				flags |= ObjectValueFlags.ReadOnly;
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:16,代码来源:FieldValueReference.cs

示例9: GetFlags

		internal static ObjectValueFlags GetFlags (FieldInfoMirror field)
		{
			var flags = ObjectValueFlags.Field;

			if (field.IsStatic)
				flags |= ObjectValueFlags.Global;

			if (field.IsPublic)
				flags |= ObjectValueFlags.Public;
			else if (field.IsPrivate)
				flags |= ObjectValueFlags.Private;
			else if (field.IsFamily)
				flags |= ObjectValueFlags.Protected;
			else if (field.IsFamilyAndAssembly)
				flags |= ObjectValueFlags.Internal;
			else if (field.IsFamilyOrAssembly)
				flags |= ObjectValueFlags.InternalProtected;

			return flags;
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:20,代码来源:FieldValueReference.cs

示例10: FieldValueReference

		public FieldValueReference (EvaluationContext ctx, FieldInfoMirror field, object obj, TypeMirror declaringType, string vname, ObjectValueFlags vflags, FieldReferenceBatch batch = null): base (ctx)
		{
			this.field = field;
			this.obj = obj;
			this.declaringType = declaringType;
			this.vname = vname;
			this.batch = batch;
			flags = vflags;

			if (field.IsStatic)
				this.obj = null;

			var objectMirror = obj as ObjectMirror;
			if (objectMirror != null)
				EnsureContextHasDomain (objectMirror.Domain);

			flags |= GetFlags (field);

			if (obj is PrimitiveValue)
				flags |= ObjectValueFlags.ReadOnly;
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:21,代码来源:FieldValueReference.cs

示例11: Run

		public ObjectValue Run (string name, ObjectValueFlags flags, ObjectEvaluatorDelegate evaluator)
		{
			string id;
			int tid;
			lock (asyncCallbacks) {
				tid = asyncCounter++;
				id = tid.ToString ();
			}
			
			ObjectValue val = null;
			bool done = runner.Run (delegate {
					if (tid >= cancelTimestamp)
						val = evaluator ();
			},
			delegate {
				if (tid >= cancelTimestamp)
					OnEvaluationDone (id, val);
			});
			
			if (done)
				return val;
			else
				return ObjectValue.CreateEvaluating (this, new ObjectPath (id, name), flags);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:24,代码来源:AsyncEvaluationTracker.cs

示例12: FieldValueReference

		public FieldValueReference (EvaluationContext ctx, FieldInfoMirror field, object obj, TypeMirror declaringType, string vname, ObjectValueFlags vflags): base (ctx)
		{
			this.field = field;
			this.obj = obj;
			this.declaringType = declaringType;
			this.vname = vname;
			flags = vflags;
			if (field.IsStatic) {
				flags |= ObjectValueFlags.Global;
				this.obj = null;
			}
			if (field.IsPublic)
				flags |= ObjectValueFlags.Public;
			else if (field.IsPrivate)
				flags |= ObjectValueFlags.Private;
			else if (field.IsFamily)
				flags |= ObjectValueFlags.Protected;
			else if (field.IsFamilyAndAssembly)
				flags |= ObjectValueFlags.Internal;
			else if (field.IsFamilyOrAssembly)
				flags |= ObjectValueFlags.InternalProtected;
			if (obj is PrimitiveValue)
				flags |= ObjectValueFlags.ReadOnly;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:24,代码来源:FieldValueReference.cs

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

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

示例15: CreateArray

		public static ObjectValue CreateArray (IObjectValueSource source, ObjectPath path, string typeName, int arrayCount, ObjectValueFlags flags, ObjectValue[] children)
		{
			ObjectValue ob = Create (source, path, typeName);
			ob.arrayCount = arrayCount;
			ob.flags = flags | ObjectValueFlags.Array;
			ob.value = "[" + arrayCount + "]";
			if (children != null && children.Length > 0) {
				ob.children = new List<ObjectValue> ();
				ob.children.AddRange (children);
			}
			return ob;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:12,代码来源:ObjectValue.cs


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