Ejemplo n.º 1
0
            private void _StartIni(string path)
            {
                var ini = new Regulus.Utility.Ini(System.IO.File.ReadAllText(path));
                var port_string = ini.Read("Launch", "port");
                int port = int.Parse(port_string);
                string dllpath = ini.Read("Launch", "path");
                string className = ini.Read("Launch", "class");

                _Start(port, dllpath, className);
            }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += (sender, a) =>
            {
                Regulus.Utility.CrashDump.Write();
                Environment.Exit(0);
            };
            var ini = new Regulus.Utility.Ini(System.IO.File.ReadAllText(args[0]));

            var sourcePath = ini.Read("Setting", "SourcePath");
            var sourceNamespace = ini.Read("Setting", "Namespace");
            var providerName = ini.Read("Setting", "ProviderName");
            var outputPath = ini.Read("Setting", "OutputPath");
            var dumpCode = ini.Read("Setting", "DumpCode");

            GhostProviderGenerator ghostProviderGenerator  = new GhostProviderGenerator();
            var codes = ghostProviderGenerator.Build(sourcePath, outputPath, providerName, new string[] { sourceNamespace });

            if (dumpCode == "true")
            {
                System.IO.File.WriteAllLines(outputPath + ".cs" , codes);
            }
        }