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


C# Soft.TypeMirror类代码示例

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


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

示例1: FieldInfoMirror

		public FieldInfoMirror (TypeMirror parent, long id, string name, TypeMirror type, FieldAttributes attrs) : base (parent.VirtualMachine, id) {
			this.parent = parent;
			this.name = name;
			this.type = type;
			this.attrs = attrs;
			inited = true;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:FieldInfoMirror.cs

示例2: MonoProperty

 public MonoProperty(StackFrame frame, LocalVariable localVariable, TypeMirror typeMirror, Mirror childMirror)
 {
     this.frame = frame;
     this.variable = localVariable;
     this.mirror = typeMirror;
     this.childMirror = childMirror;
 }
开发者ID:Staticlabs,项目名称:MonoRemoteDebugger,代码行数:7,代码来源:MonoProperty.cs

示例3: PropertyInfoMirror

		public PropertyInfoMirror (TypeMirror parent, long id, string name, MethodMirror get_method, MethodMirror set_method, PropertyAttributes attrs) : base (parent.VirtualMachine, id) {
			this.parent = parent;
			this.name = name;
			this.attrs = attrs;
			this.get_method = get_method;
			this.set_method = set_method;
		}
开发者ID:shana,项目名称:Mono.Debugger.Soft,代码行数:7,代码来源:PropertyInfoMirror.cs

示例4: ParameterInfoMirror

		internal ParameterInfoMirror (MethodMirror method, int pos, TypeMirror type, string name, ParameterAttributes attrs) : base (method.VirtualMachine, 0) {
			this.method = method;
			this.pos = pos;
			this.type = type;
			this.name = name;
			this.attrs = attrs;
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:7,代码来源:ParameterInfoMirror.cs

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

示例6: PropertyValueReference

		public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, MethodMirror getter, Value[] indexerArgs): base (ctx)
		{
			this.property = property;
			this.obj = obj;
			this.declaringType = declaringType;
			this.indexerArgs = indexerArgs;
			
			flags = GetFlags (property, getter);
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:9,代码来源:PropertyValueReference.cs

示例7: ExpandedProperty

 public ExpandedProperty(TypeMirror typeMirror, StackFrame frame, LocalVariable localVariable)
 {
     this.frame = frame;
     this.localVariable = localVariable;
     var properties = typeMirror.GetProperties().Cast<Mirror>();
     var methods = typeMirror.GetMethods().Cast<Mirror>();
     var fields = typeMirror.GetFields().Cast<Mirror>();
     var children = properties.Concat(methods).Concat(fields);
     allProperties = children.ToList();
 }
开发者ID:Staticlabs,项目名称:MonoRemoteDebugger,代码行数:10,代码来源:MonoProperty.cs

示例8: TypeValue

        public TypeValue(TypeMirror instance)
        {
            Contract.Requires(instance != null);

            var props = from p in instance.GetAllProperties() where p.HasSimpleGetter() && (p.GetGetMethod(true) != null && p.GetGetMethod(true).IsStatic) || (p.GetSetMethod() != null && p.GetSetMethod().IsStatic) select p;
            var fields = from f in instance.GetAllFields() where f.IsStatic select f;

            m_instance = instance;
            Length = props.Count() + fields.Count();
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:10,代码来源:TypeValue.cs

示例9: EnumMirror

		internal EnumMirror (VirtualMachine vm, TypeMirror type, PrimitiveValue value) : base (vm, type, new Value[] { value }) {
			if (type == null)
				throw new ArgumentNullException ("type");
			if (value == null)
				throw new ArgumentNullException ("value");
			if (!type.IsEnum)
				throw new ArgumentException ("type must be an enum type", "type");
			TypeMirror t = type.EnumUnderlyingType;
			if (value.Value == null || !value.Value.GetType ().IsPrimitive || t != vm.RootDomain.GetCorrespondingType (value.Value.GetType ()))
				throw new ArgumentException ("Value '" + value.Value + "' does not match the type of the enum.");
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:11,代码来源:EnumMirror.cs

示例10: ExceptionEventRequest

		internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught) : base (vm, EventType.Exception) {
			if (exc_type != null) {
				CheckMirror (vm, exc_type);
				TypeMirror exception_type = vm.RootDomain.Corlib.GetType ("System.Exception", false, false);
				if (!exception_type.IsAssignableFrom (exc_type))
					throw new ArgumentException ("The exception type does not inherit from System.Exception", "exc_type");
			}
			this.exc_type = exc_type;
			this.caught = caught;
			this.uncaught = uncaught;
		}
开发者ID:shana,项目名称:Mono.Debugger.Soft,代码行数:11,代码来源:ExceptionEventRequest.cs

示例11: PropertyValueReference

		public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, MethodMirror getter, Value[] indexerArgs): base (ctx)
		{
			this.declaringType = declaringType;
			this.indexerArgs = indexerArgs;
			this.property = property;
			this.getter = getter;
			this.obj = obj;

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

			flags = GetFlags (property, getter);
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:14,代码来源:PropertyValueReference.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)
				this.obj = null;

			flags |= GetFlags (field);

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

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

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

示例15: AppendCustomAttrs

		void AppendCustomAttrs (IList<CustomAttributeDataMirror> attrs, TypeMirror type, bool inherit)
		{
			if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
				cattrs = new CustomAttributeDataMirror [0];

			if (cattrs == null) {
				CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false);
				cattrs = CustomAttributeDataMirror.Create (vm, info);
			}

			foreach (var attr in cattrs) {
				if (type == null || attr.Constructor.DeclaringType == type)
					attrs.Add (attr);
			}

			if (inherit && BaseType != null)
				BaseType.AppendCustomAttrs (attrs, type, inherit);
		}
开发者ID:ming871,项目名称:NoahGameFrame,代码行数:18,代码来源:TypeMirror.cs


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