|
|
|
@ -6,6 +6,7 @@ using System.Linq;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
|
|
|
|
|
namespace ParionsCuite.DataContractPersistance
|
|
|
|
|
{
|
|
|
|
@ -39,10 +40,24 @@ namespace ParionsCuite.DataContractPersistance
|
|
|
|
|
Directory.CreateDirectory(FilePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
using (Stream s = File.Create(Path.Combine(FilePath, FileName)))
|
|
|
|
|
{
|
|
|
|
|
serialiser.WriteObject(s, evenements);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
var setting = new XmlWriterSettings() { Indent = true };
|
|
|
|
|
using (TextWriter tw = File.CreateText(Path.Combine(FilePath, FileName)))
|
|
|
|
|
{
|
|
|
|
|
using (XmlWriter writer = XmlWriter.Create(tw, setting))
|
|
|
|
|
{
|
|
|
|
|
serialiser.WriteObject(writer, evenements);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|