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

            if (!fieldRef.IsEmpty)
            {
                fieldRef.DeclaringType.GetInputAssemblies(assemblies);
            }
        }
Esempio n. 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));
        }
Esempio n. 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
        }
Esempio n. 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));
            }
        }
Esempio n. 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));
            }
        }
Esempio n. 6
0
 public FieldDesc(FieldRef fieldRef, TypeDesc fieldType, string name, bool isStatic)
     : base(name, isStatic)
 {
     this.Field     = fieldRef;
     this.FieldType = fieldType;
 }
Esempio n. 7
0
 public MemberRef(FieldRef field)
     : this()
 {
     this.Field = field;
 }