MonoField MonoReflectionField FieldInfo

mono\mcs\class\corlib\System.Reflection\MonoField.cs

[StructLayout (LayoutKind.Sequential)]

internal class MonoField : RtFieldInfo {
internal IntPtr klass;
internal RuntimeFieldHandle fhandle;
string name;
Type type;
FieldAttributes attrs;

public override FieldAttributes Attributes {
get {
return attrs;
}
}
public override RuntimeFieldHandle FieldHandle {
get {
return fhandle;
}
}


[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern Type ResolveType ();


public override Type FieldType { 
get {
if (type == null)
type = ResolveType ();
return type;
}
}


[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern Type GetParentType (bool declaring);


public override Type ReflectedType {
get {
return GetParentType (false);
}
}
public override Type DeclaringType {
get {
return GetParentType (true);
}
}
public override string Name {
get {
return name;
}
}

猜你喜欢

转载自blog.csdn.net/linuxheik/article/details/80356095
今日推荐