Ejemplo n.º 1
0
        public int GetHashCode(IFieldInfo obj)
        {
            if (obj == null)
            {
                return(0);
            }

            unchecked
            {
                int hash = 17;
                hash = hash * 23 + EqualityComparer <string> .Default.GetHashCode(obj.Name);

                hash = hash * 23 + TypeInfoComparer.Default.GetHashCode(obj.DeclaringType);
                hash = hash * 23 + RuntimeBindingSignature.GetFieldSignature(obj).GetHashCode();
                return(hash);
            }
        }
Ejemplo n.º 2
0
        public FieldDefinition GetField(string name)
        {
            var signature = RuntimeBindingSignature.GetFieldSignature(name);

            return(_fieldMapping.Get(signature));
        }