public static T Get <T>(this System.Collections.Generic.IDictionary <string, object> dictionary, string key, T defaultValue)
 {
     if (dictionary.ContainsKey(key))
     {
         object value;
         dictionary.TryGetValue(key, out value);
         return(ValueUtility.ChangeType <T>(value, defaultValue));
     }
     return(defaultValue);
 }
Пример #2
0
 public static T ChangeType <T>(object value)
 {
     return(ValueUtility.ChangeType <T>(value, default(T)));
 }