@@ -35,6 +35,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="LoaderHelper.cs" />
<Compile Include="XmlHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+
+namespace Helper
+{
+ public static class LoaderHelper
+ {
+ public static Assembly Load(string path)
+ byte[] buffer = File.ReadAllBytes(path);
+ var assembly = Assembly.Load(buffer);
+ return assembly;
+ }
+}
@@ -6,7 +6,7 @@ using System.Xml.Serialization;
namespace Helper
{
- public class XmlHelper
+ public static class XmlHelper
/// <summary>
/// 对象序列化成 XML String