61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
using CoderEngine;
|
||
|
||
namespace UseEngineConsolo
|
||
{
|
||
|
||
|
||
public class A
|
||
{
|
||
public int a { get; set; }
|
||
public int aa { get; set; }
|
||
public DateTime? date { get; set; }
|
||
public List<B> Blist { get; set; }
|
||
}
|
||
|
||
public class B
|
||
{
|
||
public string b { get; set; }
|
||
public List<C> Clist { get; set; }
|
||
}
|
||
|
||
public class C
|
||
{
|
||
public string string_b { get; set; }
|
||
}
|
||
|
||
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);
|
||
Console.WriteLine();
|
||
Console.WriteLine();
|
||
string CSCode = new CSharpCodeWrite().ModelToJavaCode("UseEngineConsolo", "A");
|
||
Console.WriteLine();
|
||
Console.WriteLine("C#实体类动态转C#客户端代码结果:");
|
||
Console.WriteLine();
|
||
Console.WriteLine(CSCode);
|
||
Console.ReadLine();
|
||
}
|
||
}
|
||
|
||
|
||
}
|