Пример #1
0
        public void Compose(IModule composableModule, IServiceRepository serviceContainer)
        {
            var register    = serviceContainer.Get <IServiceRegistrationProvider>();
            var modules     = serviceContainer.Get <IModuleEnumerator>();
            var logProvider = serviceContainer.Get <ILogProvider>();

            var portsStore       = serviceContainer.Get <IEmulatedPortStore>();
            var deviceEnumerator = serviceContainer.Get <IDeviceEnumerator>();
            var stoneProvider    = serviceContainer.Get <IStoneProvider>();
            var mappingsStore    = serviceContainer.Get <IControllerElementMappingProfileStore>();

            var loader = new EmulatorExecutableProvider(logProvider.GetLogger("EmulatorExecutableLoader"), modules);

            register.RegisterService <IEmulatorExecutableProvider>(loader);

            register.RegisterService <IEmulatedPortsManager>(new EmulatedPortsManager(portsStore, deviceEnumerator,
                                                                                      mappingsStore, stoneProvider));
        }
        public void Compose(IModule composableModule, IServiceRepository serviceContainer)
        {
            var register    = serviceContainer.Get <IServiceRegistrationProvider>();
            var modules     = serviceContainer.Get <IModuleEnumerator>();
            var logProvider = serviceContainer.Get <ILogProvider>();
            var cdp         = serviceContainer.Get <IContentDirectoryProvider>();

            var loader = new EmulatorExecutableProvider(logProvider.GetLogger("EmulatorExecutableLoader"), modules);

            register.RegisterService <IEmulatorExecutableProvider>(loader);

            var emucdp = new EmulatorTaskRootDirectoryProvider(cdp);

            register.RegisterService <IEmulatorTaskRootDirectoryProvider>(emucdp);

            var systemFileProvider = new SystemFileProvider(cdp);

            register.RegisterService <ISystemFileProvider>(systemFileProvider);

            var savingProvider = new SaveLocationProvider(cdp);

            register.RegisterService <ISaveLocationProvider>(savingProvider);
        }