Exemplo n.º 1
0
 /// <summary>Initializes a new instance of the <seealso cref="CachedTypeInfoBase{TPropertyKey}"/> class.</summary>
 /// <param name="objectType">The object type whose info is being stored in this object.</param>
 public CachedTypeInfoBase(Type objectType)
 {
     ObjectType           = objectType;
     Constructor          = objectType.GetConstructor(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, Type.EmptyTypes, null);
     ObjectTypeProperties = objectType.GetProperties();
     Properties           = new KeyedPropertyInfoDictionary <TPropertyKey>();
     for (int i = 0; i < ObjectTypeProperties.Length; i++)
     {
         var p = CreateProperty(ObjectTypeProperties[i]);
         if (p.Key != null && !Properties.ContainsValue(p))
         {
             Properties.Add(p);
         }
     }
 }
 /// <summary>Initializes a new instance of the <seealso cref="KeyedPropertyInfoDictionary{TKey}"/> class.</summary>
 /// <param name="dictionary">The dictionary to initialize this dictionary out of.</param>
 public KeyedPropertyInfoDictionary(KeyedPropertyInfoDictionary <TKey> dictionary) : base(dictionary)
 {
 }