예제 #1
0
        public dynamic GetOption(string name)
        {
            Serializer.Serializer serializer = new Serializer.Serializer();
            var option = Table <Option>().Get(name);

            if (option == null || option.Value == null)
            {
                return(null);
            }
            return(serializer.Deserialize(option.Value));
        }
예제 #2
0
        public T GetOption <T>(string name)
        {
            Serializer.Serializer serializer = new Serializer.Serializer();
            var option = Table <Option>().Get(name);

            if (option == null || option.Value == null)
            {
                return(default(T));
            }
            return((T)serializer.Deserialize(option.Value));
        }