Example #1
0
 public TableProvider(Mapper mapper,
                      DatabaseService databaseService,
                      IHubEventEmitter hubEventEmitter,
                      IEventProxy eventProxy)
 {
     _mapper          = mapper;
     _databaseService = databaseService;
     _hubEventEmitter = hubEventEmitter;
     _eventProxy      = eventProxy;
     Tables           = CreateMockTables();
 }
Example #2
0
 public PokerHub(
     DatabaseService databaseService,
     TableProvider tableProvider,
     PokerUserProvider pokerUserProvider,
     IEventProxy eventProxy,
     TableManager tableManager,
     IHubEventEmitter hubEventEmitter)
 {
     _databaseService   = databaseService;
     _tableProvider     = tableProvider;
     _pokerUserProvider = pokerUserProvider;
     _eventProxy        = eventProxy;
     _tableManager      = tableManager;
     _hubEventEmitter   = hubEventEmitter;
 }
Example #3
0
        public void Handle(IEventProxy proxy)
        {
            var command = proxy.GetEvent <CrmNotifierRequest>();

            try
            {
                Handle(command);
                proxy.Completed();
            }
            catch (Exception ex)
            {
                var errorMessage =
                    $@"Principal Error in: {GetType().Name}, method : Handle, booking: {command.RecordLocator}, innerExceptionType: {ex.GetType()}, innerExceptionMessage: {ex.Message}";
                Trace.TraceError(errorMessage, ex);
                proxy.Failed(PolicyHint.IsTransient, errorMessage);
            }
        }
Example #4
0
 public TableManager(IEventProxy eventProxy, IHubEventEmitter hubEventEmitter)
 {
     _eventProxy      = eventProxy;
     _hubEventEmitter = hubEventEmitter;
 }
Example #5
0
 public HubEventEmitter(IHubContext <PokerHub> hubContext,
                        IEventProxy eventProxy)
 {
     _hubContext = hubContext;
     _answers    = new ConcurrentDictionary <string, object>();
 }