Пример #1
0
        public static T GetFromBinary(string key)
        {
            _file = ConfigFileName.GetFileName(key);
            SerializeHelper <T> ser = new SerializeHelper <T>();

            return(ser.Deserialize(true, _file));
        }
Пример #2
0
        public static void SaveToBinary(string key, T obj)
        {
            _file = ConfigFileName.GetFileName(key);
            SerializeHelper <T> ser = new SerializeHelper <T>();

            ser.Serialize(true, _file, obj);
        }
Пример #3
0
 public static T GetFromXml(string key)
 {
     _file = ConfigFileName.GetFileName(key);
     return(XmlHelper.XmlToFromFile(_file, typeof(T)) as T);
 }
Пример #4
0
 public static void SaveToXml(string key, T obj)
 {
     _file = ConfigFileName.GetFileName(key);
     XmlHelper.ToXml(obj, _file, true);
 }