コード例 #1
0
        public static void Main(string [] args)
        {
            var services = new ServiceContainer();

            if (args.Length == 0)
            {
                services.AddService(typeof(IServiceFactory), new ServiceFactory(services));
                services.AddService(typeof(IDialogFactory), new WindowsFormsDialogFactory(services));
                services.AddService(typeof(IRegistryService), new WindowsFormsRegistryService());
                services.AddService(typeof(ISettingsService), new WindowsFormsSettingsService(services));
                var interactor = new MainFormInteractor(services);
                interactor.Run();
            }
            else
            {
                var listener = NullDecompilerEventListener.Instance;

                services.AddService(typeof(DecompilerEventListener), listener);
                services.AddService(typeof(IRegistryService), new WindowsFormsRegistryService());
                services.AddService(typeof(IConfigurationService), RekoConfigurationService.Load());
                var ldr = new Loader(services);
                var dec = new DecompilerDriver(ldr, services);
                dec.Decompile(args[0]);
            }
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            var services = new ServiceContainer();

            services.AddService(typeof(IServiceFactory), new ServiceFactory(services));
            services.AddService(typeof(IDialogFactory), new WindowsFormsDialogFactory(services));
            services.AddService(typeof(IRegistryService), new WindowsFormsRegistryService());
            services.AddService(typeof(ISettingsService), new WindowsFormsSettingsService(services));
            var interactor = new MainFormInteractor(services);

            interactor.Run();
        }