コード例 #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);
        }
コード例 #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);
        }