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); } }
public FieldDefinition GetField(string name) { var signature = RuntimeBindingSignature.GetFieldSignature(name); return(_fieldMapping.Get(signature)); }