Program.cs
Home
/
ToolPack1 /
Test /
Test.Console /
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools.ConfigurationTool;
using Tools.ConfigurationTool.Config;
using Tools.ConfigurationTool.ConfigMultiple;
namespace Test.Console
{
//public class ConfigData : BaseCustomSerialazible<ConfigData.ConfigData_Serial>
//{
// public class ConfigData_Serial
// {
// public class Item
// {
// public int Key { set; get; }
// public string Value { set; get; }
// }
// public string Name { set; get; }
// public int ID { set; get; }
// public List<Item> dictionary { set; get; }
// }
// public string Name { set; get; } = "n";
// public int ID { set; get; } = 23;
// public Dictionary<int, string> dictionary { set; get; } = new Dictionary<int, string>
// {
// [1]="1",
// [2]="2"
// };
// public override ConfigData_Serial Export()
// => new ConfigData_Serial()
// {
// ID = ID,
// Name = Name,
// dictionary = dictionary
// .Select(e =>
// new ConfigData_Serial.Item()
// {
// Key = e.Key,
// Value = e.Value
// }
// )
// .ToList()
// };
// public override void Import(ConfigData_Serial obj)
// {
// ConfigData_Serial data = (ConfigData_Serial)obj;
// ID = data.ID;
// Name = data.Name;
// dictionary = data.dictionary
// .ToDictionary(e => e.Key, e2 => e2.Value);
// }
//}
class Program
{
static void Main(string[] args)
{
//var conf = new ConfigurationManager<ConfigData>(new ConfigParams()
//{
// ConfigFile = "Config.xml",
// Format = EnumFormat.XML,
// UseApplicationPathPrefix = true
//});
var e1 = new Entity1()
{
ID = 10,
Firstname = "fn",
Secondname = "sn",
Date = DateTime.Now
};
var e2 = new Entity1.Transfromator()
.ToEntityT2(e1);
var e1_2 = new Entity1.Transfromator()
.ToEntityT1(e2);
}
}
}