public abstract Task Handle(IAsyncNotification message);
public AppToastNotification(IAsyncNotification notification) { Notification = notification; }
public static Task PublishDomainEvent(IAsyncNotification evt) => _cheat.Mediator.PublishAsync(evt);
private IEnumerable <AsyncNotificationHandlerWrapper> GetNotificationHandlers(IAsyncNotification notification) { return(GetNotificationHandlers <AsyncNotificationHandlerWrapper>(notification, typeof(IAsyncNotificationHandler <>), typeof(AsyncNotificationHandlerWrapper <>))); }
public void AddDomainEvent(IAsyncNotification eventItem) { _domainEvents = _domainEvents ?? new List <IAsyncNotification>(); _domainEvents.Add(eventItem); }
public virtual Task PublishAsync(IAsyncNotification notification) { return(_mediator.PublishAsync(notification)); }
/// <summary> /// Provides the asynchronous observer with new data. /// </summary> /// <typeparam name="TValue">The object that provides notification information.</typeparam> /// <typeparam name="TResult">The type of the asynchronous result.</typeparam> /// <param name="observer">An asynchronous observer.</param> /// <param name="value">The current asynchronous notification information.</param> /// <returns>A <see cref="Task"/> that is signaled when the asynchronous observation completes.</returns> public static Task <TResult> OnNextAsync <TValue, TResult>(this IObserver <IAsyncNotification <TValue, TResult> > observer, IAsyncNotification <TValue, TResult> value) { Contract.Requires(observer != null); Contract.Requires(value != null); Contract.Ensures(Contract.Result <Task <TResult> >() != null); observer.OnNext(value); return(value.Task); }
/// <summary> /// Projects the specified <paramref name="notification"/> into a new notification containing the value returned by the specified <paramref name="selector"/> function /// and linked to the state of the specified <paramref name="notification"/>. /// </summary> /// <typeparam name="TValue">The type of the old notification information.</typeparam> /// <typeparam name="TTaskResult">The type of the asynchronous result of the old and new notifications.</typeparam> /// <typeparam name="TResult">The type of the new notification information.</typeparam> /// <param name="notification">The notification from which to project a new notification.</param> /// <param name="selector">A function that projects the specified <paramref name="notification"/> into a new notification.</param> /// <returns>A new <see cref="IAsyncNotification{TResult,TTaskResult}"/> containing the value returned by the specified <paramref name="selector"/> function.</returns> public static IAsyncNotification <TResult, TTaskResult> Select <TValue, TTaskResult, TResult>(this IAsyncNotification <TValue, TTaskResult> notification, Func <TValue, TResult> selector) { Contract.Requires(notification != null); Contract.Requires(selector != null); Contract.Ensures(Contract.Result <IAsyncNotification <TResult, TTaskResult> >() != null); return(new AsyncNotificationProjection <TResult, TTaskResult>(selector(notification.Value), notification)); }
public Task PublishAsync(IAsyncNotification notification) { return _mediator.PublishAsync(notification.RouteTo(_baseAddress)); }
public Task PublishAsync(IAsyncNotification notification) { _logger.LogTrace("PublishAsync {@notification}", notification); return(_inner.PublishAsync(notification)); }
void PublishDomainEvent(IAsyncNotification evt) { _eventBus.PublishOnCurrentThread(evt); _mediator.PublishAsync(evt); }
public Task PublishAsync(IAsyncNotification notification) { throw new NotSupportedException(); }
public Task PublishAsync(IAsyncNotification notification) { throw new NotImplementedException(); }