コード例 #1
0
 public EventHandlerFactory(
     IEthApiContractService ethApi,
     IEventSubscriptionStateRepository stateFactory,
     IEventContractQueryConfigurationRepository contractQueryFactory = null,
     IEventAggregatorRepository eventAggregatorRepository            = null,
     IEthGetTransactionByHash getTransactionProxy                     = null,
     ISubscriberQueueRepository subscriberQueueRepository             = null,
     ISubscriberQueueFactory subscriberQueueFactory                   = null,
     ISubscriberSearchIndexRepository subscriberSearchIndexRepository = null,
     ISubscriberSearchIndexFactory subscriberSearchIndexFactory       = null,
     IEventRuleRepository eventRuleRepository = null,
     ISubscriberStorageRepository subscriberStorageRepository = null,
     ISubscriberStorageFactory subscriberRepositoryFactory    = null)
 {
     EthApi                          = ethApi;
     StateFactory                    = stateFactory;
     ContractQueryFactory            = contractQueryFactory;
     EventAggregatorRepository       = eventAggregatorRepository;
     GetTransactionProxy             = getTransactionProxy;
     SubscriberQueueRepository       = subscriberQueueRepository;
     SubscriberQueueFactory          = subscriberQueueFactory;
     SubscriberSearchIndexRepository = subscriberSearchIndexRepository;
     SubscriberSearchIndexFactory    = subscriberSearchIndexFactory;
     EventRuleRepository             = eventRuleRepository;
     SubscriberStorageRepository     = subscriberStorageRepository;
     SubscriberRepositoryFactory     = subscriberRepositoryFactory;
 }
        public EventProcessingConfigurationRepository(
            ISubscriberRepository subscriberRepository,
            ISubscriberContractRepository subscriberContractRepository,
            IEventSubscriptionRepository eventSubscriptionRepository,
            IEventSubscriptionAddressRepository eventSubscriptionAddressRepository,
            IEventHandlerRepository eventHandlerRepository,
            IParameterConditionRepository parameterConditionRepository,
            IEventSubscriptionStateRepository eventSubscriptionStateRepository,
            IContractQueryRepository contractQueryRepository,
            IContractQueryParameterRepository contractQueryParameterRepository,
            IEventAggregatorRepository eventAggregatorRepository,
            ISubscriberQueueRepository subscriberQueueRepository,
            ISubscriberSearchIndexRepository subscriberSearchIndexRepository,
            IEventHandlerHistoryRepository eventHandlerHistoryRepository,
            IEventRuleRepository eventRuleRepository,
            ISubscriberStorageRepository subscriberStorageRepository
            )
        {
            Subscribers                = subscriberRepository;
            SubscriberContracts        = subscriberContractRepository;
            EventSubscriptions         = eventSubscriptionRepository;
            EventSubscriptionAddresses = eventSubscriptionAddressRepository;
            EventHandlers              = eventHandlerRepository;
            ParameterConditions        = parameterConditionRepository;
            EventSubscriptionStates    = eventSubscriptionStateRepository;
            ContractQueries            = contractQueryRepository;
            ContractQueryParameters    = contractQueryParameterRepository;
            EventAggregators           = eventAggregatorRepository;
            SubscriberQueues           = subscriberQueueRepository;
            SubscriberSearchIndexes    = subscriberSearchIndexRepository;
            EventHandlerHistoryRepo    = eventHandlerHistoryRepository;
            EventRules        = eventRuleRepository;
            SubscriberStorage = subscriberStorageRepository;

            EventContractQueries = new EventContractQueryConfigurationRepository(ContractQueries, SubscriberContracts, ContractQueryParameters);
        }