Exemple #1
0
        public static T Deserialize <T>(string filePath, ITextSerializer <T> textSerializer)
        {
            var streamSerializer = new TextStreamSerializer <T>(textSerializer);

            var value = FileSerializer.Deserialize <T>(filePath, streamSerializer);

            return(value);
        }
Exemple #2
0
        public static void Serialize <T>(string filePath, T value, ITextSerializer <T> textSerializer, bool overwrite = true)
        {
            var streamSerializer = new TextStreamSerializer <T>(textSerializer);

            FileSerializer.Serialize(filePath, value, streamSerializer, overwrite);
        }
 public void Serialize(string filePath, T obj, bool overwrite = true)
 {
     FileSerializer.Serialize(filePath, obj, this.StreamSerializer, overwrite);
 }
        public T Deserialize(string filePath)
        {
            var value = FileSerializer.Deserialize(filePath, this.StreamSerializer);

            return(value);
        }