public IHttpActionResult PostReleaseNotification([NakedBody] string message = null, bool critical = false) { var notification = new ReleaseNotification { Critical = critical, Date = DateTimeOffset.UtcNow, Message = message }; _messagePublisher.Publish(notification); return(Ok(notification)); }
public async Task <ActionResult <ReleaseNotification> > PostReleaseNotificationAsync(object body = null, bool critical = false) { var notification = new ReleaseNotification { Critical = critical, Date = SystemClock.UtcNow, Message = body as string }; await _messagePublisher.PublishAsync(notification); return(Ok(notification)); }
public async Task <ActionResult <ReleaseNotification> > PostReleaseNotificationAsync(ValueFromBody <string> message, bool critical = false) { var notification = new ReleaseNotification { Critical = critical, Date = SystemClock.UtcNow, Message = message?.Value }; await _messagePublisher.PublishAsync(notification); return(Ok(notification)); }
public async Task <IActionResult> PostReleaseNotificationAsync([FromBody] string message = null, [FromQuery] bool critical = false) { var notification = new ReleaseNotification { Critical = critical, Date = SystemClock.UtcNow, Message = message }; await _messagePublisher.PublishAsync(notification); return(Ok(notification)); }
private Task OnReleaseNotificationAsync(ReleaseNotification notification, CancellationToken cancellationToken = default) { _logger.LogTrace("Sending release notification message: {Message}", notification.Message); return(TypedBroadcastAsync(notification)); }
private Task OnReleaseNotificationAsync(ReleaseNotification notification, CancellationToken cancellationToken = default(CancellationToken)) { _logger.Trace(() => $"Sending release notification message: {notification.Message})"); return(Context.Connection.TypedBroadcastAsync(notification)); }
private Task OnReleaseNotificationAsync(ReleaseNotification notification, CancellationToken cancellationToken = default(CancellationToken)) { return(Context.Connection.TypedBroadcastAsync(notification)); }
private void OnReleaseNotification(ReleaseNotification notification) { try { Clients.All.releaseNotification(notification); } catch (NullReferenceException) {} // TODO: Remove this when SignalR bug is fixed. }