# HG changeset patch # User cin # Date 1505945667 -10800 # Node ID 133ba4444accbdff9ad910c2052121a2f8e31968 # Parent 3eaa9372c75403ba69b0a023f114fc53176ff8ee# Parent 3e26338eb97732f552aaf60ac01bc23116429d02 Слияние diff -r 3e26338eb977 -r 133ba4444acc Implab/Xml/SerializationHelpers.cs --- a/Implab/Xml/SerializationHelpers.cs Wed Sep 13 16:55:13 2017 +0300 +++ b/Implab/Xml/SerializationHelpers.cs Thu Sep 21 01:14:27 2017 +0300 @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -32,6 +33,11 @@ return doc; } + public static void SerializeToFile(string file, T obj) { + using (var writer = File.CreateText(file)) + SerializersPool.Instance.Serialize(writer, obj); + } + public static T DeserializeFromString(string data) { return SerializersPool.Instance.DeserializeFromString(data); }