コード例 #1
0
ファイル: Configuration.cs プロジェクト: afifmohammed/hydra
        public static EventStoreConfiguration ConfigureSubscriptions(this EventStoreConfiguration configuration, params IEnumerable <Subscription>[] subscriptions)
        {
            configuration.ConfigureSubscriptions(subscriptions
                                                 .SelectMany(x => x)
                                                 .ToArray());

            return(configuration);
        }
コード例 #2
0
        public static EventStoreConfiguration <TEventStoreConnectionStringName> ConfigureSubscribers <TEventStoreConnectionStringName>(
            this EventStoreConfiguration <TEventStoreConnectionStringName> configuration,
            PublishersBySubscription subscribers)
            where TEventStoreConnectionStringName : class
        {
            configuration.ConfigureSubscriptions(subscribers.Select(x => x.Key));

            new RequestsRegistration <PublishersBySubscription>(() => subscribers)
            .Register <ConfiguredSubscribers, Subscriber>(
                (input, provider) => EventStore <AdoNetTransactionUowProvider <TEventStoreConnectionStringName> > .Subscriber(provider),
                Return.List);

            return(configuration);
        }
コード例 #3
0
        public static EventStoreConfiguration <TEventStoreUowProvider> ConfigureSubscribers <TEventStoreUowProvider, TProjectionProvider>(
            this EventStoreConfiguration <TEventStoreUowProvider> configuration,
            ProjectorsBySubscription <TProjectionProvider> subscribers)
            where TEventStoreUowProvider : class, IUowProvider
            where TProjectionProvider : IUowProvider
        {
            configuration.ConfigureSubscriptions(subscribers.Select(x => x.Key));

            new RequestsRegistration <ProjectorsBySubscription <TProjectionProvider> >(() => subscribers)
            .Register <ConfiguredSubscribers, Subscriber>(
                (input, provider) => ProjectorStore <TEventStoreUowProvider, TProjectionProvider> .Subscriber(provider),
                Return.List);

            return(configuration);
        }