Tweaked plugin downloading a bit

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-03 17:56:30 -04:00
parent 7f8a477278
commit fc735e9187
11 changed files with 91 additions and 23 deletions

View File

@@ -39,6 +39,14 @@ namespace MediaBrowser.Common.Serialization
}
}
public static void SerializeToFile(object obj, string file)
{
using (FileStream stream = new FileStream(file, FileMode.Create))
{
ServiceStack.Text.XmlSerializer.SerializeToStream(obj, stream);
}
}
public static object DeserializeFromFile(Type type, string file)
{
using (Stream stream = File.OpenRead(file))