Cleanup : TBF.Tools removed

This commit is contained in:
Milan Hanajik
2021-03-05 12:35:33 +01:00
parent 2a96af3503
commit f87cbe9e54
4 changed files with 0 additions and 203 deletions
-30
View File
@@ -1,30 +0,0 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System.IO;
using System.Xml.Serialization;
namespace TBF.Tools
{
public static class XmlTools
{
public static string ToXmlString<T>(this T input)
{
using (var writer = new StringWriter())
{
input.ToXml(writer);
return writer.ToString();
}
}
public static void ToXml<T>(this T objectToSerialize, Stream stream)
{
new XmlSerializer(typeof(T)).Serialize(stream, objectToSerialize);
}
public static void ToXml<T>(this T objectToSerialize, StringWriter writer)
{
new XmlSerializer(typeof(T)).Serialize(writer, objectToSerialize);
}
}
}