本文整理汇总了C#中IEventStore类的典型用法代码示例。如果您正苦于以下问题:C# IEventStore类的具体用法?C# IEventStore怎么用?C# IEventStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEventStore类属于命名空间,在下文中一共展示了IEventStore类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefaultCommitEventService
/// <summary>Parameterized constructor.
/// </summary>
/// <param name="waitingCommandService"></param>
/// <param name="aggregateRootTypeCodeProvider"></param>
/// <param name="aggregateRootFactory"></param>
/// <param name="eventStreamConvertService"></param>
/// <param name="eventSourcingService"></param>
/// <param name="memoryCache"></param>
/// <param name="aggregateStorage"></param>
/// <param name="retryCommandService"></param>
/// <param name="eventStore"></param>
/// <param name="eventPublisher"></param>
/// <param name="actionExecutionService"></param>
/// <param name="eventSynchronizerProvider"></param>
/// <param name="loggerFactory"></param>
public DefaultCommitEventService(
IWaitingCommandService waitingCommandService,
IAggregateRootTypeCodeProvider aggregateRootTypeCodeProvider,
IAggregateRootFactory aggregateRootFactory,
IEventStreamConvertService eventStreamConvertService,
IEventSourcingService eventSourcingService,
IMemoryCache memoryCache,
IAggregateStorage aggregateStorage,
IRetryCommandService retryCommandService,
IEventStore eventStore,
IEventPublisher eventPublisher,
IActionExecutionService actionExecutionService,
IEventSynchronizerProvider eventSynchronizerProvider,
ILoggerFactory loggerFactory)
{
_waitingCommandService = waitingCommandService;
_aggregateRootTypeCodeProvider = aggregateRootTypeCodeProvider;
_aggregateRootFactory = aggregateRootFactory;
_eventStreamConvertService = eventStreamConvertService;
_eventSourcingService = eventSourcingService;
_memoryCache = memoryCache;
_aggregateStorage = aggregateStorage;
_retryCommandService = retryCommandService;
_eventStore = eventStore;
_eventPublisher = eventPublisher;
_actionExecutionService = actionExecutionService;
_eventSynchronizerProvider = eventSynchronizerProvider;
_logger = loggerFactory.Create(GetType().Name);
}
示例2: CreateKernel
protected override global::Ninject.IKernel CreateKernel()
{
Store = Bootstrapper.Instance.Get<IEventStore>();
DataCache = Bootstrapper.Instance.Get<IRepositoryCache>();
return Bootstrapper.Instance.Kernel;
}
示例3: DefaultCommandExecutor
public DefaultCommandExecutor(
IProcessingCommandCache processingCommandCache,
ICommandAsyncResultManager commandAsyncResultManager,
ICommandHandlerProvider commandHandlerProvider,
IAggregateRootTypeProvider aggregateRootTypeProvider,
IMemoryCache memoryCache,
IRepository repository,
IRetryCommandService retryCommandService,
IEventStore eventStore,
IEventPublisher eventPublisher,
IEventPersistenceSynchronizerProvider eventPersistenceSynchronizerProvider,
ICommandContext commandContext,
ILoggerFactory loggerFactory)
{
_processingCommandCache = processingCommandCache;
_commandAsyncResultManager = commandAsyncResultManager;
_commandHandlerProvider = commandHandlerProvider;
_aggregateRootTypeProvider = aggregateRootTypeProvider;
_memoryCache = memoryCache;
_repository = repository;
_retryCommandService = retryCommandService;
_eventStore = eventStore;
_eventPublisher = eventPublisher;
_eventPersistenceSynchronizerProvider = eventPersistenceSynchronizerProvider;
_commandContext = commandContext;
_trackingContext = commandContext as ITrackingContext;
_logger = loggerFactory.Create(GetType().Name);
if (_trackingContext == null)
{
throw new Exception("command context must also implement ITrackingContext interface.");
}
}
示例4: Initialize
public void Initialize(IEventStore eventStore, bool purgeExistingViews = false)
{
foreach (var batch in eventStore.Stream().Batch(1000))
{
Dispatch(eventStore, batch.Select(e => _domainEventSerializer.Deserialize(e)));
}
}
示例5: EventApplier
public EventApplier(IEventStore eventstore, HandlerRegistry handlerregistry, IHandlerInstanceResolver resolver,IParameterResolver parameterresolver)
{
this.eventstore = eventstore;
this.handlerregistry = handlerregistry;
this.resolver = resolver;
this.parameterresolver = parameterresolver;
}
示例6: CollectionService
public CollectionService(
IEventStore eventStore,
IPublishEvents eventsPublisher)
{
this.eventStore = eventStore;
this.eventsPublisher = eventsPublisher;
}
示例7: CommandBus
public CommandBus(IEventStore eventstore, HandlerRegistry handlerregistry, IHandlerInstanceResolver resolver,IParameterResolver ParameterResolver)
{
this.eventstore = eventstore;
this.handlerregistry = handlerregistry;
this.resolver = resolver;
this.ParameterResolver = ParameterResolver;
}
示例8: MagistrateRegistry
public MagistrateRegistry(IEventStore store)
{
Scan(a =>
{
a.TheCallingAssembly();
a.WithDefaultConventions();
a.AddAllTypesOf(typeof(IRequestHandler<,>));
a.AddAllTypesOf(typeof(INotificationHandler<>));
a.AddAllTypesOf(typeof(IController));
});
For<SingleInstanceFactory>().Use<SingleInstanceFactory>(ctx => t => ctx.GetInstance(t));
For<MultiInstanceFactory>().Use<MultiInstanceFactory>(ctx => t => ctx.GetAllInstances(t));
For<IMediator>().Use<Mediator>();
Policies.Add<ServicePolicy>();
Policies.Add<ReadModelPolicy>();
For<Projectionist>().Singleton();
For<IEventStore>()
.Use(context => new ProjectionStore(store, context.GetInstance<Projectionist>().Apply));
For<AggregateStore<Guid>>().Use(ctx => new AggregateStore<Guid>(ctx.GetInstance<IEventStore>()));
For<JsonSerializerSettings>().Use(new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
});
}
示例9: UserStoryService
public UserStoryService(
IEventStore eventStore,
IPublishEvents eventsPublisher)
{
this.eventsPublisher = eventsPublisher;
this.eventStore = eventStore;
}
示例10: Arrange
public void Arrange()
{
// Arrange.
eventStore = MockRepository.GenerateMock<IEventStore>();
repository = new Repository<SchedulerJob>(eventStore);
schedulerJobCommandHandlers = new SchedulerJobCommandHandlers(repository);
}
示例11: Dispatch
public void Dispatch(IEventStore eventStore, IEnumerable<DomainEvent> events)
{
foreach (var e in events)
{
Console.WriteLine(e);
}
}
示例12: ErrorQueueLoader
public ErrorQueueLoader(ITransactor transactor, IEventStore eventStore, IEventErrorStoreRepository eventErrorStoreRepository, IHandlerSequenceRespository handlerSequenceRepRespository)
{
_transactor = transactor;
_eventStore = eventStore;
_eventErrorStoreRepository = eventErrorStoreRepository;
_handlerSequenceRepRespository = handlerSequenceRepRespository;
}
示例13: RegistrationApplicationService
public RegistrationApplicationService( IEventStore eventStore,IDomainIdentityService ids, IUserIndexService uniqueness, PasswordGenerator generator)
{
_eventStore = eventStore;
_ids = ids;
_uniqueness = uniqueness;
_generator = generator;
}
示例14: DefaultEventService
public DefaultEventService(
IJsonSerializer jsonSerializer,
IScheduleService scheduleService,
ITypeNameProvider typeNameProvider,
IMemoryCache memoryCache,
IAggregateRootFactory aggregateRootFactory,
IAggregateStorage aggregateStorage,
IEventStore eventStore,
IMessagePublisher<DomainEventStreamMessage> domainEventPublisher,
IOHelper ioHelper,
ILoggerFactory loggerFactory)
{
_eventMailboxDict = new ConcurrentDictionary<string, EventMailBox>();
_ioHelper = ioHelper;
_jsonSerializer = jsonSerializer;
_scheduleService = scheduleService;
_typeNameProvider = typeNameProvider;
_memoryCache = memoryCache;
_aggregateRootFactory = aggregateRootFactory;
_aggregateStorage = aggregateStorage;
_eventStore = eventStore;
_domainEventPublisher = domainEventPublisher;
_logger = loggerFactory.Create(GetType().FullName);
_batchSize = ENodeConfiguration.Instance.Setting.EventMailBoxPersistenceMaxBatchSize;
}
示例15: EventViewerController
public EventViewerController()
: base()
{
_storage = ServiceLocator.EventStore;
PageSize = 15;
_saveSessionVars = true;
}