コード例 #1
0
ファイル: Resource.cs プロジェクト: DevSw/BtrieveWrapper
 public static bool ContainsFieldInfoKey(MemberInfo memberInfo)
 {
     if (memberInfo == null)
     {
         throw new ArgumentNullException();
     }
     Resource.SetRecord(memberInfo.DeclaringType);
     return(_fieldMemberInfoDictionary.ContainsKey(memberInfo));
 }
コード例 #2
0
ファイル: Resource.cs プロジェクト: DevSw/BtrieveWrapper
 public static RecordInfo GetRecordInfo(Type recordType)
 {
     if (recordType == null)
     {
         throw new ArgumentNullException();
     }
     Resource.SetRecord(recordType);
     return(_recordDictionary[recordType]);
 }
コード例 #3
0
ファイル: Resource.cs プロジェクト: DevSw/BtrieveWrapper
 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);
     }
 }
コード例 #4
0
ファイル: Resource.cs プロジェクト: DevSw/BtrieveWrapper
        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);
            }
        }