public static IPublishCommands GetCommandPublisher()
        {
            var unitOfWork = new EntityFrameworkUnitOfWork(ContextFactory);

            IPublishCommands commandPublisher = new CommandPublisher(unitOfWork, currentUserSession);
            commandPublisher.Subscribe(new ClientService(unitOfWork));

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

            var authorizer = new CommandAuthorizer(currentUserSession);
            var commandRetry = new PublishRetry();
            IPublishCommands commandPublisher = new CommandPublisher(unitOfWork, authorizer, commandRetry);

            commandPublisher.Subscribe(new ClientService(unitOfWork));
            return commandPublisher;
        }