public static bool ContainsFieldInfoKey(MemberInfo memberInfo) { if (memberInfo == null) { throw new ArgumentNullException(); } Resource.SetRecord(memberInfo.DeclaringType); return(_fieldMemberInfoDictionary.ContainsKey(memberInfo)); }
public static RecordInfo GetRecordInfo(Type recordType) { if (recordType == null) { throw new ArgumentNullException(); } Resource.SetRecord(recordType); return(_recordDictionary[recordType]); }
public static FieldInfo GetFieldInfo(MemberInfo memberInfo) { if (memberInfo == null) { throw new ArgumentNullException(); } Resource.SetRecord(memberInfo.DeclaringType); if (_fieldMemberInfoDictionary.ContainsKey(memberInfo)) { return(_fieldMemberInfoDictionary[memberInfo]); } else { return(null); } }
public static FieldInfo GetFieldInfo(Type recordType, string propertyName) { if (recordType == null || propertyName == null) { throw new ArgumentNullException(); } Resource.SetRecord(recordType); var name = recordType.FullName + "." + propertyName; if (_fieldNameDictionary.ContainsKey(name)) { return(_fieldNameDictionary[name]); } else { return(null); } }