Example #1
0
 public async Task PublishOperationCompletedAsync(OperationCompleted @event)
 => await _hubContextWrapper.PublishToUserAsync(@event.UserId,
                                                "operation_completed",
                                                new
 {
     id       = @event.Id,
     name     = @event.Name,
     resource = @event.Resource
 });
Example #2
0
 public async Task PublishOperationPendingAsync(OperationDto operation)
 => await _hubContextWrapper.PublishToUserAsync(operation.UserId,
                                                "operation_pending",
                                                new
 {
     id   = operation.Id,
     name = operation.Name
 }
                                                );
Example #3
0
 public async Task PublishOperationPendingAsync(OperationPending @event)
 => await _hubContextWrapper.PublishToUserAsync(@event.UserId,
                                                "operation_pending",
                                                new
 {
     id       = @event.Id,
     name     = @event.Name,
     resource = @event.Resource
 }
                                                );
Example #4
0
 public async Task PublishOperationPendingAsync(OperationPending @event)
 => await _hubContextWrapper.PublishToUserAsync(@event.UserId,
                                                OperationBase.OPERATION_PENDING,
                                                new
 {
     id       = @event.Id,
     name     = @event.Name,
     resource = @event.Resource
 }
                                                );
Example #5
0
 public async Task PublishGameEventSourceAddedAsync(GameEventSourceAdded @event)
 {
     await _hubContextWrapper.PublishToUserAsync(new System.Guid("53286016-126e-45eb-8d8c-4adfcf95ca1e"), "game_event_source_added",
                                                 new
     {
         id    = @event.Id,
         score = @event.Score,
         isWin = @event.IsWin
     }
                                                 );
 }