예제 #1
0
        internal static void GetInputAssemblies(this FieldRef fieldRef, ISet <AssemblyName> assemblies)
        {
            Requires.NotNull(assemblies, nameof(assemblies));

            if (!fieldRef.IsEmpty)
            {
                fieldRef.DeclaringType.GetInputAssemblies(assemblies);
            }
        }
예제 #2
0
        public static FieldInfo Resolve(this FieldRef fieldRef)
        {
            if (fieldRef.IsEmpty)
            {
                return(null);
            }

            var manifest = fieldRef.Resolver.GetManifest(fieldRef.AssemblyName);

            return(manifest.ResolveField(fieldRef.MetadataToken));
        }
예제 #3
0
        public static FieldInfo Resolve(this FieldRef fieldRef)
        {
            if (fieldRef.IsEmpty)
            {
                return(null);
            }

#if RuntimeHandles
            var manifest = fieldRef.Resolver.GetManifest(fieldRef.AssemblyName);
            return(manifest.ResolveField(fieldRef.MetadataToken));
#else
            return(Resolve(fieldRef.DeclaringType).GetField(fieldRef.Name, AllInstanceMembers));
#endif
        }
예제 #4
0
        public static FieldInfo Resolve(this FieldRef fieldRef)
        {
            if (fieldRef == null)
            {
                return(null);
            }

            if (TryUseFastReflection(fieldRef.DeclaringType, out Module manifest))
            {
                return(manifest.ResolveField(fieldRef.MetadataToken));
            }
            else
            {
                return(Resolve(fieldRef.DeclaringType).GetField(fieldRef.Name, AllMembers));
            }
        }
예제 #5
0
        public static FieldInfo Resolve(this FieldRef fieldRef)
        {
            if (fieldRef.IsEmpty)
            {
                return(null);
            }

#if RuntimeHandles
            if (TryUseFastReflection(fieldRef.DeclaringType, out Module manifest))
            {
                return(manifest.ResolveField(fieldRef.MetadataToken));
            }
            else
#endif
            {
                return(Resolve(fieldRef.DeclaringType).GetField(fieldRef.Name, AllMembers));
            }
        }
예제 #6
0
 public FieldDesc(FieldRef fieldRef, TypeDesc fieldType, string name, bool isStatic)
     : base(name, isStatic)
 {
     this.Field     = fieldRef;
     this.FieldType = fieldType;
 }
예제 #7
0
 public MemberRef(FieldRef field)
     : this()
 {
     this.Field = field;
 }