Esempio n. 1
0
        public static IPublishCommands GetCommandPublisher()
        {
            var commandPublisher = new LocalCommandPublisher();
            var unitOfWork       = new InMemoryUnitOfWork(DataStore);

            commandPublisher.Subscribe(new ClientService(unitOfWork, Logger));

            return(commandPublisher);
        }
        public static IPublishCommands GetCommandPublisher()
        {
            var commandPublisher = new LocalCommandPublisher();
            var unitOfWork       = new EntityFrameworkUnitOfWork(ContextFactory);

            commandPublisher.Subscribe(new ClientService(unitOfWork, Logger));

            return(commandPublisher);
        }
Esempio n. 3
0
        public static IPublishCommands GetCommandPublisher()
        {
            var unitOfWork = new EntityFrameworkUnitOfWork(ContextFactory);

            IPublishCommands commandPublisher = new LocalCommandPublisher(unitOfWork);

            commandPublisher = new CommandPublisherAuthorizer(commandPublisher, currentUserSession);
            commandPublisher = new CommandLogger(commandPublisher);
            commandPublisher = new CommandRetry(commandPublisher);
            commandPublisher.Subscribe(new ClientService(unitOfWork));

            return(commandPublisher);
        }
Esempio n. 4
0
        private static void SubscribeToCommands()
        {
            LocalCommandPublisher = new LocalCommandPublisher();

            ((LocalCommandPublisher)LocalCommandPublisher).Subscribe(ClientApplicationService);
            ((LocalCommandPublisher)LocalCommandPublisher).Subscribe(AccountApplicationService);
        }