summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs b/win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs
new file mode 100644
index 000000000..5ede69963
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop.Test/EncodeJobsPersist.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+using System.Xml.Serialization;
+using HandBrake.Interop;
+
+namespace HandBrakeInterop.Test
+{
+ public static class EncodeJobsPersist
+ {
+ private static XmlSerializer xmlSerializer = new XmlSerializer(typeof(EncodeJob));
+
+ public static EncodeJob GetJob(string jobName)
+ {
+ XDocument doc = XDocument.Load(jobName + ".xml");
+ using (XmlReader reader = doc.CreateReader())
+ {
+ var job = xmlSerializer.Deserialize(reader) as EncodeJob;
+
+
+
+ return job;
+ }
+ }
+ }
+}