Update director
This commit is contained in:
@@ -15,7 +15,8 @@ namespace Ewide.Core.Util
|
||||
{
|
||||
public class XmlSerializerUtil
|
||||
{
|
||||
static string path = @"D:\ewide_core\Api\Ewide.Core\SeedDataXml\";
|
||||
static string[] str = AppDomain.CurrentDomain.BaseDirectory.Split("ewide_core");
|
||||
static string path = str[0]+ @"ewide_core\Api\Ewide.Core\SeedDataXml\";
|
||||
public Dictionary<Type, object> ReaderALL()
|
||||
{
|
||||
Dictionary<Type, object> dic = new Dictionary<Type, object>();
|
||||
@@ -77,7 +78,8 @@ namespace Ewide.Core.Util
|
||||
/// <param name="className">XML名称</param>
|
||||
public void WriteXML(Type type, object data, string className)
|
||||
{
|
||||
string writePath = @"D:\ewide_core\Api\Ewide.Core\SeedDataXml\" + className + ".xml";
|
||||
|
||||
string writePath = path + className + ".xml";
|
||||
using (FileStream fs = new FileStream(writePath, FileMode.OpenOrCreate))
|
||||
{
|
||||
XmlSerializer ser = new XmlSerializer(type);
|
||||
|
||||
Reference in New Issue
Block a user