Volian.Base.Library & Baseline
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
@@ -17,7 +16,6 @@ namespace Volian.Base.Library
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
xs.Serialize(new NonXsiTextWriter(ms, Encoding.Unicode), t);
|
||||
//xs.Serialize(ms, t);
|
||||
ms.Position = 0;
|
||||
StreamReader sr = new StreamReader(ms);
|
||||
strOutput = sr.ReadToEnd();
|
||||
@@ -38,26 +36,6 @@ namespace Volian.Base.Library
|
||||
}
|
||||
return t;
|
||||
}
|
||||
//public static void WriteFile(T t, string fileName)
|
||||
//{
|
||||
// string strOutput = string.Empty;
|
||||
// XmlSerializer xs = new XmlSerializer(typeof(T));
|
||||
// using (FileStream fs = new FileStream(fileName, FileMode.Create))
|
||||
// {
|
||||
// xs.Serialize(new NonXsiTextWriter(fs, Encoding.UTF8), t);
|
||||
// fs.Close();
|
||||
// }
|
||||
//}
|
||||
//public static T ReadFile(string fileName)
|
||||
//{
|
||||
// T t;
|
||||
// XmlSerializer xs = new XmlSerializer(typeof(T));
|
||||
// using (FileStream fs = new FileStream(fileName, FileMode.Open))
|
||||
// {
|
||||
// t = (T)xs.Deserialize(fs);
|
||||
// }
|
||||
// return t;
|
||||
//}
|
||||
}
|
||||
public class NonXsiTextWriter : XmlTextWriter
|
||||
{
|
||||
@@ -79,8 +57,6 @@ namespace Volian.Base.Library
|
||||
}
|
||||
if (localName == "xlink_href")
|
||||
base.WriteStartAttribute(prefix, "xlink:href", ns);
|
||||
//else if (localName == "encoding")
|
||||
// _skip = true;
|
||||
else
|
||||
base.WriteStartAttribute(prefix, localName, ns);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user