示例#1
0
        public static void Main(string[] args)
        {
            var services = new ServiceContainer();
            var listener = new CmdLineListener
            {
                Quiet = Console.IsOutputRedirected
            };
            var config        = RekoConfigurationService.Load(services);
            var diagnosticSvc = new CmdLineDiagnosticsService(Console.Out);
            var fsSvc         = new FileSystemServiceImpl();
            var dcSvc         = new DecompilerService();

            services.AddService <IDecompilerService>(dcSvc);
            services.AddService <DecompilerEventListener>(listener);
            services.AddService <IConfigurationService>(config);
            services.AddService <ITypeLibraryLoaderService>(new TypeLibraryLoaderServiceImpl(services));
            services.AddService <IDiagnosticsService>(diagnosticSvc);
            services.AddService <IFileSystemService>(fsSvc);
            services.AddService <IDecompiledFileService>(new DecompiledFileService(fsSvc));
            services.AddService <ITestGenerationService>(new TestGenerationService(services));
            var ldr        = new Loader(services);
            var decompiler = new Decompiler(ldr, services);

            dcSvc.Decompiler = decompiler;
            var driver = new CmdLineDriver(services, ldr, decompiler, listener);

            driver.Execute(args);
        }
示例#2
0
 public static void Main(string[] args)
 {
     var services = new ServiceContainer();
     var listener = new CmdLineListener();
     var config = new DecompilerConfiguration();
     var diagnosticSvc = new CmdLineDiagnosticsService(Console.Out);
     services.AddService(typeof(DecompilerEventListener), listener);
     services.AddService(typeof(IConfigurationService), config);
     services.AddService(typeof(ITypeLibraryLoaderService), new TypeLibraryLoaderServiceImpl());
     services.AddService(typeof(IDiagnosticsService), diagnosticSvc);
     var driver = new CmdLineDriver(services, config);
     driver.Execute(args);
 }
示例#3
0
 public static void Main(string[] args)
 {
     var services = new ServiceContainer();
     var listener = new CmdLineListener();
     var config = RekoConfigurationService.Load();
     var diagnosticSvc = new CmdLineDiagnosticsService(Console.Out);
     services.AddService<DecompilerEventListener>(listener);
     services.AddService<IConfigurationService>(config);
     services.AddService<ITypeLibraryLoaderService>(new TypeLibraryLoaderServiceImpl(services));
     services.AddService<IDiagnosticsService>(diagnosticSvc);
     services.AddService<IFileSystemService>(new FileSystemServiceImpl());
     services.AddService<DecompilerHost>(new CmdLineHost());
     var driver = new CmdLineDriver(services, config);
     driver.Execute(args);
 }
示例#4
0
        public static void Main(string[] args)
        {
            var services      = new ServiceContainer();
            var listener      = new CmdLineListener();
            var config        = new DecompilerConfiguration();
            var diagnosticSvc = new CmdLineDiagnosticsService(Console.Out);

            services.AddService(typeof(DecompilerEventListener), listener);
            services.AddService(typeof(IConfigurationService), config);
            services.AddService(typeof(ITypeLibraryLoaderService), new TypeLibraryLoaderServiceImpl());
            services.AddService(typeof(IDiagnosticsService), diagnosticSvc);
            var driver = new CmdLineDriver(services, config);

            driver.Execute(args);
        }
示例#5
0
        public static void Main(string[] args)
        {
            var services      = new ServiceContainer();
            var listener      = new CmdLineListener();
            var config        = RekoConfigurationService.Load();
            var diagnosticSvc = new CmdLineDiagnosticsService(Console.Out);

            services.AddService <DecompilerEventListener>(listener);
            services.AddService <IConfigurationService>(config);
            services.AddService <ITypeLibraryLoaderService>(new TypeLibraryLoaderServiceImpl(services));
            services.AddService <IDiagnosticsService>(diagnosticSvc);
            services.AddService <IFileSystemService>(new FileSystemServiceImpl());
            services.AddService <DecompilerHost>(new CmdLineHost());
            var driver = new CmdLineDriver(services, config);

            driver.Execute(args);
        }