当前位置: 首页>>代码示例>>C#>>正文


C# IEventStore类代码示例

本文整理汇总了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);
 }
开发者ID:key-value,项目名称:enode,代码行数:44,代码来源:DefaultCommitEventService.cs

示例2: CreateKernel

        protected override global::Ninject.IKernel CreateKernel()
        {
            Store = Bootstrapper.Instance.Get<IEventStore>();
            DataCache = Bootstrapper.Instance.Get<IRepositoryCache>();

            return Bootstrapper.Instance.Kernel;
        }
开发者ID:nullkiller,项目名称:GetEventStoreSample,代码行数:7,代码来源:Global.asax.cs

示例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.");
            }
        }
开发者ID:hjlfmy,项目名称:enode,代码行数:33,代码来源:DefaultCommandExecutor.cs

示例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)));
     }
 }
开发者ID:mcquiggd,项目名称:Cirqus,代码行数:7,代码来源:SynchronousViewManagerEventDispatcher.cs

示例5: EventApplier

 public EventApplier(IEventStore eventstore, HandlerRegistry handlerregistry, IHandlerInstanceResolver resolver,IParameterResolver parameterresolver)
 {
     this.eventstore = eventstore;
     this.handlerregistry = handlerregistry;
     this.resolver = resolver;
     this.parameterresolver = parameterresolver;
 }
开发者ID:rmoorman,项目名称:Scritchy,代码行数:7,代码来源:EventApplier.cs

示例6: CollectionService

 public CollectionService(
     IEventStore eventStore, 
     IPublishEvents eventsPublisher)
 {
     this.eventStore = eventStore;
     this.eventsPublisher = eventsPublisher;
 }
开发者ID:victorpictor,项目名称:Kan,代码行数:7,代码来源:CollectionService.cs

示例7: CommandBus

 public CommandBus(IEventStore eventstore, HandlerRegistry handlerregistry, IHandlerInstanceResolver resolver,IParameterResolver ParameterResolver)
 {
     this.eventstore = eventstore;
     this.handlerregistry = handlerregistry;
     this.resolver = resolver;
     this.ParameterResolver = ParameterResolver;
 }
开发者ID:rmoorman,项目名称:Scritchy,代码行数:7,代码来源:CommandBus.cs

示例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()
            });
        }
开发者ID:Pondidum,项目名称:Magistrate,代码行数:29,代码来源:MagistrateRegistry.cs

示例9: UserStoryService

 public UserStoryService(
     IEventStore eventStore,
     IPublishEvents eventsPublisher)
 {
     this.eventsPublisher = eventsPublisher;
     this.eventStore = eventStore;
 }
开发者ID:victorpictor,项目名称:Kan,代码行数:7,代码来源:UserStoryService.cs

示例10: Arrange

 public void Arrange()
 {
     // Arrange.
     eventStore = MockRepository.GenerateMock<IEventStore>();
     repository = new Repository<SchedulerJob>(eventStore);
     schedulerJobCommandHandlers = new SchedulerJobCommandHandlers(repository);
 }
开发者ID:ntulip,项目名称:Elasticity,代码行数:7,代码来源:CommandsToEventStoreTests.cs

示例11: Dispatch

 public void Dispatch(IEventStore eventStore, IEnumerable<DomainEvent> events)
 {
     foreach (var e in events)
     {
         Console.WriteLine(e);
     }
 }
开发者ID:linearregression,项目名称:Cirqus,代码行数:7,代码来源:ConsoleOutEventDispatcher.cs

示例12: ErrorQueueLoader

 public ErrorQueueLoader(ITransactor transactor, IEventStore eventStore, IEventErrorStoreRepository eventErrorStoreRepository, IHandlerSequenceRespository handlerSequenceRepRespository)
 {
     _transactor = transactor;
     _eventStore = eventStore;
     _eventErrorStoreRepository = eventErrorStoreRepository;
     _handlerSequenceRepRespository = handlerSequenceRepRespository;
 }
开发者ID:brucewu16899,项目名称:lacjam,代码行数:7,代码来源:ErrorQueueLoader.cs

示例13: RegistrationApplicationService

 public RegistrationApplicationService( IEventStore eventStore,IDomainIdentityService ids, IUserIndexService uniqueness,  PasswordGenerator generator)
 {
     _eventStore = eventStore;
     _ids = ids;
     _uniqueness = uniqueness;
     _generator = generator;
 }
开发者ID:AGiorgetti,项目名称:lokad-cqrs,代码行数:7,代码来源:RegistrationApplicationService.cs

示例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;
 }
开发者ID:ulswww,项目名称:enode,代码行数:25,代码来源:DefaultEventService.cs

示例15: EventViewerController

 public EventViewerController()
     : base()
 {
     _storage = ServiceLocator.EventStore;
     PageSize = 15;
     _saveSessionVars = true;
 }
开发者ID:AlexSugak,项目名称:EComWithCQRS,代码行数:7,代码来源:EventViewerController.cs


注:本文中的IEventStore类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。