本文整理汇总了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;
}
示例2: MonoProperty
public MonoProperty(StackFrame frame, LocalVariable localVariable, TypeMirror typeMirror, Mirror childMirror)
{
this.frame = frame;
this.variable = localVariable;
this.mirror = typeMirror;
this.childMirror = childMirror;
}
示例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;
}
示例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;
}
示例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
}
示例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);
}
示例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();
}
示例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();
}
示例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.");
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}