public CommandServicer() { _currentRepositoryContextProvider = ObjectContainer.Resolve <ICurrentRepositoryContextProvider>(); _repositoryContextManager = ObjectContainer.Resolve <IRepositoryContextManager>(); _commandHandler = ObjectContainer.Resolve <ICommandHandler>(); _commandDelegateFactory = ObjectContainer.Resolve <ICommandServicerDelegateFactory>(); }
public CommandServicer(ICurrentRepositoryContextProvider currentRepositoryContextProvider , IRepositoryContextManager repositoryContextManager, ICommandHandler commandHandler , ICommandServicerDelegateFactory commandDelegateFactory) { _currentRepositoryContextProvider = currentRepositoryContextProvider; _repositoryContextManager = repositoryContextManager; _commandHandler = commandHandler; _commandDelegateFactory = commandDelegateFactory; }
public RabbitMQMessagingHandler() { _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType()); _jsonSerialzer = ObjectContainer.Resolve <IJsonSerializer>(); _repositoryContextManager = ObjectContainer.Resolve <IRepositoryContextManager>(); _currentRepositoryContextProvider = ObjectContainer.Resolve <ICurrentRepositoryContextProvider>(); _commandDelegateFactory = ObjectContainer.Resolve <ICommandServicerDelegateFactory>(); _commandHandler = ObjectContainer.Resolve <ICommandHandler>(); }
public CommandHandler(IRepositoryContextManager contextManager, ILoggerFactory loggerFactory, IJsonSerializer jsonSerializer, ICurrentRepositoryContextProvider currentRepositoryContextProvider, ICommandServicerDelegateFactory delegateFactory) { _contextManager = contextManager; _logger = loggerFactory.Create <CommandHandler>(); _jsonSerialzer = jsonSerializer; _currentContextProvider = currentRepositoryContextProvider; _delegateFactory = delegateFactory; }
protected void FlushToPersistence() { lock (_sync) { IRepositoryContextManager contextManager = ObjectContainer.Resolve <IRepositoryContextManager>(); using (var context = contextManager.Current) { context.Commit(); } contextManager.Create(); } }
public MessageServicer() { _provider = ObjectContainer.Resolve <ICurrentRepositoryContextProvider>(); _repositoryContextManager = ObjectContainer.Resolve <IRepositoryContextManager>(); }
public DomainBaseService() { _currentRepositoryContextProvider = ObjectContainer.Resolve <ICurrentRepositoryContextProvider>(); _repositoryContextManager = ObjectContainer.Resolve <IRepositoryContextManager>(); }