Exemple #1
0
 public Member GetMember(string propertyName)
 {
     Member p;
     if (members.TryGetValue(propertyName, out p))
         return p;
     lock (members)
     {
         var mi = Type.GetMember(propertyName);
         if (mi.Length != 1)
             throw new MemberNotFoundException(propertyName);
         return members[propertyName] = new Member(mi[0], true);
     }
 }
Exemple #2
0
 public bool TryGetMember(string propertyName, out Member prop)
 {
     EnsureAllMembersLoaded();
     return members.TryGetValue(propertyName, out prop);
 }