public async Task<IHttpActionResult> PostSystemNotificationAsync([NakedBody]string message) { if (String.IsNullOrWhiteSpace(message)) return NotFound(); var notification = new SystemNotification { Date = DateTimeOffset.UtcNow, Message = message }; await _cacheClient.SetAsync("system-notification", notification); await _messagePublisher.PublishAsync(notification); return Ok(notification); }
private Task OnSystemNotificationAsync(SystemNotification notification, CancellationToken cancellationToken = default(CancellationToken)) { return Context.Connection.TypedBroadcast(notification); }
public IHttpActionResult PostSystemNotification([NakedBody]string message) { if (String.IsNullOrEmpty(message)) return NotFound(); var notification = new SystemNotification { Date = DateTimeOffset.UtcNow, Message = message }; _cacheClient.Set("system-notification", notification); _messagePublisher.Publish(notification); return Ok(notification); }