コード例 #1
0
ファイル: Program.cs プロジェクト: chartly/flood
        public static int Main(string[] args)
        {
            var options = new Options();

            if (!ParseCommandLineOptions(args, options))
                return 1;

            if (!Directory.Exists(options.OutputDir))
                Directory.CreateDirectory(options.OutputDir);

            try
            {
                var compiler = new Compiler(options.Assembly, options.OutputDir);
                compiler.Process();
                compiler.Compile(options.Assembly);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                return 1;
            }

            return 0;
        }
コード例 #2
0
ファイル: RPCGenTests.cs プロジェクト: chartly/flood
        public void GenAPI()
        {
            string genDirectory = Path.Combine("..", "..", "gen", "RPCGen.Tests.API");
            Directory.CreateDirectory(genDirectory);

            var sourceDllPath = Path.GetFullPath("RPCGen.Tests.Services.dll");
            var destDllPath = Path.Combine(genDirectory, "RPCGen.Tests.Services.dll");

            var rpcCompiler = new Compiler(sourceDllPath, genDirectory);
            rpcCompiler.Process();
            rpcCompiler.CompileApi(destDllPath);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: tritao/flood
        static void Main(string[] args)
        {
            var options = new Options();

            if (!ParseCommandLineOptions(args, options))
                return;

            if (!Directory.Exists(options.OutputDir))
                Directory.CreateDirectory(options.OutputDir);

            Assembly assembly;
            if (!ParseAssembly(options.Assembly, out assembly))
                return;

            var compiler = new Compiler(options, assembly);
            compiler.Process();

            if(!string.IsNullOrEmpty(options.MSBuildProjectPath)){
                MSBuildUpdater.UpdateMSBuild(options.MSBuildProjectPath,compiler.GeneratedFiles);
            }
        }