示例#1
0
 public static void Initialize(IEventRegistry eventRegistry, IEventBus eventBus, AnalyticsOperationRequestRepository OperationRequestRepository, AnalyticsRegistry analyticsRegistry)//, IServiceProvider services)
 {
     _eventRegistry = eventRegistry;
     _eventBus      = eventBus;
     _OperationRequestRepository = OperationRequestRepository;
     _analyticsRegistry          = analyticsRegistry;
 }
示例#2
0
 /// <summary>
 /// Subscribe to new analytical modules. It's not the best place for this method.
 /// </summary>
 public static void ListenNewModules()
 {
     _eventRegistry.Register <AnalyticModuleRegistrationRequestEvent>(Exchanges.ModuleRegistration);
     _eventBus.SubscribeToTopic((AnalyticModuleRegistrationRequestEvent @event) =>
     {
         using (IServiceScope scope = Services.CreateScope())
         {
             _analyticsRegistry = scope.ServiceProvider.GetRequiredService <AnalyticsRegistry>();
             _analyticsRegistry.Register(@event.Module);
         }
     });
 }
示例#3
0
 public AnalyticsService(IEventBus eventBus, AnalyticsOperationRequestRepository operationRequestRepository, AnalyticsRegistry analyticsRegistry)
 {
     _eventBus = eventBus;
     _operationRequestRepository = operationRequestRepository;
     _analyticsRegistry          = analyticsRegistry;
 }