public FieldDefinition GetFieldDefinition(icFieldDefinition item) { return(TryGetOrAdd(_fieldcache, item, fdef => { var tdef = GetTypeDefinition(item.DeclaringType); return tdef == null ? null : ILSpyHelper.FindMatchingField(tdef, fdef); })); }
public static FieldDefinition FindMatchingField(TypeDefinition tdef, icFieldDefinition item) { return(tdef.Fields.FirstOrDefault(p => p.ToString() == item.ToString())); }
public FieldDefinition GetFieldDefinition(icFieldDefinition item) { return TryGetOrAdd(_fieldcache, item, fdef => { var tdef = GetTypeDefinition(item.DeclaringType); return tdef == null ? null : ILSpyHelper.FindMatchingField(tdef, fdef); }); }
public static FieldDefinition FindMatchingField(TypeDefinition tdef, icFieldDefinition item) { return tdef.Fields.FirstOrDefault(p => p.ToString() == item.ToString()); }