コード例 #1
0
 public static void RegisterHandler <TEventType>(this IAfEventHub afEventHub,
                                                 Action <ILifetimeScope, IAfEvent> action)
     where TEventType : class, IAfEvent
 {
     afEventHub.RegisterHandler <TEventType>(
         (scope, e, sourceMessage) => { action.Invoke(scope, (TEventType)e); });
 }
コード例 #2
0
 public NotificationCenterCore(
     INotificationRecordService notificationRecordService,
     IAfEventHub afEventHub,
     ILPCClient <INotificationRecordServer> lpcClient)
 {
     _notificationRecordService = notificationRecordService;
     _afEventHub = afEventHub;
     _lpcClient  = lpcClient;
 }
コード例 #3
0
 public NotificationRecordService(IIndexedDbRepo <NotificationRecord, long> notificationRepo,
                                  IClock clock,
                                  ISimpleDataStorage simpleDataStorage,
                                  IAfEventHub afEventHub)
 {
     _notificationRepo  = notificationRepo;
     _clock             = clock;
     _simpleDataStorage = simpleDataStorage;
     _afEventHub        = afEventHub;
 }
コード例 #4
0
 public HandleUserClickIconJob(
     ILogger <HandleUserClickIconJob> logger,
     IAfEventHub afEventHub,
     ISimpleDataStorage simpleDataStorage,
     IClock clock)
 {
     _logger            = logger;
     _afEventHub        = afEventHub;
     _simpleDataStorage = simpleDataStorage;
     _clock             = clock;
 }
コード例 #5
0
 public ServerJob(ILogger <ServerJob> logger,
                  ILPCServer lpcServer,
                  IBkSearcherServer bkSearcherServer,
                  IAfEventHub afEventHub,
                  ISmallCache smallCache,
                  INotificationRecordServer notificationRecordServer)
 {
     _logger                   = logger;
     _lpcServer                = lpcServer;
     _bkSearcherServer         = bkSearcherServer;
     _afEventHub               = afEventHub;
     _smallCache               = smallCache;
     _notificationRecordServer = notificationRecordServer;
 }
コード例 #6
0
 public static void RegisterHandler <TEventType>(this IAfEventHub afEventHub, Func <TEventType, Task> handler)
     where TEventType : class, IAfEvent
 {
     afEventHub.RegisterHandler <TEventType>((scope, e) => { handler.Invoke((TEventType)e); });
 }