ServParam2ClientModelEngine/UseEngineConsolo/Program.cs

61 lines
1.6 KiB
C#
Raw Normal View History

2018-10-17 22:54:58 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoderEngine;
namespace UseEngineConsolo
{
public class A
{
2018-10-18 10:59:53 +08:00
public string UserID { get; set; }
public int Sex { get; set; }
public DateTime? Birthday { get; set; }
public List<B> SunList { get; set; }
2018-10-17 22:54:58 +08:00
}
public class B
{
2018-10-18 10:59:53 +08:00
public string SouUserID { get; set; }
public List<C> Girlfriends { get; set; }
2018-10-17 22:54:58 +08:00
}
public class C
{
2018-10-18 10:59:53 +08:00
public string GirlName { get; set; }
2018-10-17 22:54:58 +08:00
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("==========================================");
Console.WriteLine("====== 皓月跨语言实体类转换引擎 ======");
Console.WriteLine("==========================================");
Console.WriteLine();
Console.WriteLine();
string JavaCode = new JavaCodeWrite().ModelToJavaCode("UseEngineConsolo", "A");
Console.WriteLine();
Console.WriteLine("C#实体类动态转Java代码结果");
Console.WriteLine();
Console.WriteLine(JavaCode);
2018-10-18 07:00:43 +08:00
Console.WriteLine();
Console.WriteLine();
string CSCode = new CSharpCodeWrite().ModelToJavaCode("UseEngineConsolo", "A");
Console.WriteLine();
Console.WriteLine("C#实体类动态转C#客户端代码结果:");
Console.WriteLine();
Console.WriteLine(CSCode);
2018-10-17 22:54:58 +08:00
Console.ReadLine();
}
}
}