コード例 #1
0
 internal RedirectedPropertySetting(string name, string description, object target, PropertyInfo property, KeyValuePair <T, string>[] displayTexts)
 {
     Name        = name;
     Description = description;
     Target      = target;
     Property    = property;
     IsLookup    = true;
     foreach (KeyValuePair <T, string> kv in displayTexts)
     {
         DisplayTexts.Add(new ValueText(kv.Key, kv.Value));
     }
 }
コード例 #2
0
 internal RedirectedPropertySetting(string propertyName, string description, object target, KeyValuePair <T, string>[] displayTexts)
 {
     if (target == null)
     {
         throw new ArgumentNullException("target");
     }
     Name        = propertyName;
     Description = description;
     Target      = target;
     Property    = target.GetType().GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance);
     IsLookup    = true;
     foreach (KeyValuePair <T, string> kv in displayTexts)
     {
         DisplayTexts.Add(new ValueText(kv.Key, kv.Value));
     }
 }