示例#1
0
        public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null)
        {
            _messageBus   = core.MessageBus;
            configuration = configuration ?? StitchesConfiguration.GetDefault();
            var fileSystem = new StitchFileSystem(configuration, new DateTimeVersionManager());
            var manager    = new StitchInstanceManager(configuration, fileSystem);
            var log        = new ModuleLog(_messageBus, Name);
            var observer   = new StitchEventObserver(_messageBus, log);
            var data       = new DataHelperClient(core.MessageBus);
            var notifier   = new StitchEventNotifier(_messageBus);

            _service = new StitchesService(core, data, fileSystem, manager, observer, log, notifier);
        }
示例#2
0
        public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null)
        {
            configuration = configuration ?? StitchesConfiguration.GetDefault();
            var log  = new ModuleLog(core.MessageBus, Name);
            var data = new DataHelperClient(core.MessageBus);

            var observer       = new StitchEventObserver(core.MessageBus, data, log);
            var fileSystem     = new StitchFileSystem(configuration, new DateTimeVersionManager());
            var adaptorFactory = new StitchAdaptorFactory(core, configuration, fileSystem, log, observer);
            var manager        = new StitchInstanceManager(fileSystem, adaptorFactory);

            var notifier = new StitchEventNotifier(core.MessageBus);

            _service       = new StitchesService(core, data, fileSystem, manager, log, notifier);
            _subscriptions = new SubscriptionCollection(core.MessageBus);
        }