Exemplo n.º 1
0
        public static AssignableType <T> FromEnumDict(AnyDictionary dict, string key, T defaultVal = default(T))
        {
            var str = dict.GetValue <string>(key);

            if (str != null)
            {
                var d = StringEnumConverter.Get <T>();
                return(AssignableType <T> .Create(d[str]));
            }
            // else..
            return(new AssignableType <T>(defaultVal, false));
        }