예제 #1
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);
 }
예제 #2
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);
 }
예제 #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 ldr        = new Loader(services);
            var decompiler = new DecompilerDriver(ldr, services);
            var driver     = new CmdLineDriver(services, ldr, decompiler, listener);

            driver.Execute(args);
        }