class Program
{
// args[0] = 导出DLL的名称, args后面是DLL的文件位置
static void Main(string[] args)
{
if (args.Length < 3)
{
Console.WriteLine("输入的参数有错");
System.Environment.Exit(-1);
}
string sDLLNS = args[0];
var models = TypeModel.Create();
int iCount = args.Length;
for (int i = 1; i < iCount; i++)
{
Assembly assem = Assembly.LoadFrom(args[i]);
var types = assem.GetTypes();
foreach (var t in types)
{
models.Add(t, true);
}
}
models.Compile(sDLLNS, sDLLNS + ".dll");
Console.WriteLine("生成成功 " + sDLLNS + ".dll");
System.Environment.Exit(0);
}
}
Protobuf生成Serializer
最新推荐文章于 2024-08-14 23:53:18 发布