/// <summary> /// Initializes a new instance of the <see cref="OneWayAsyncWeakSubscription"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> /// <param name="context">The context.</param> public OneWayAsyncWeakSubscription(IAsyncActionRunner asyncActionRunner, Func <INotificationMessage, Task> actionAsync, string context) : base(asyncActionRunner, context) { _weakReference = new WeakReference(actionAsync); }
/// <summary> /// Initializes a new instance of the <see cref="OneWayAsyncSubscription" /> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="context">The context.</param> protected OneWayAsyncSubscription(IAsyncActionRunner asyncActionRunner, string context) : base(asyncActionRunner, context) { }
/// <summary> /// Initializes a new instance of the <see cref="TwoWayAsyncStrongSubscription{TMessage, TResult}"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> /// <param name="context">The context.</param> public TwoWayAsyncStrongSubscription(IAsyncActionRunner <TResult> asyncActionRunner, Func <TMessage, Task <TResult> > actionAsync, string context) : base(asyncActionRunner, context) { _actionAsync = actionAsync; }
/// <summary> /// Initializes a new instance of the <see cref="OneWayAsyncWeakSubscription"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> public OneWayAsyncWeakSubscription(IAsyncActionRunner asyncActionRunner, Func <INotificationMessage, Task> actionAsync) : this(asyncActionRunner, actionAsync, null) { }
/// <summary> /// Initializes a new instance of the <see cref="TwoWayAsyncStrongSubscription{TMessage, TResult}"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> public TwoWayAsyncStrongSubscription(IAsyncActionRunner <TResult> asyncActionRunner, Func <TMessage, Task <TResult> > actionAsync) : this(asyncActionRunner, actionAsync, null) { }
/// <summary> /// Initializes a new instance of the <see cref="TwoWayAsyncWeakSubscription{TMessage, TResult}"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> /// <param name="context">The context.</param> public TwoWayAsyncWeakSubscription(IAsyncActionRunner <TResult> asyncActionRunner, Func <TMessage, Task <TResult> > actionAsync, string context) : base(asyncActionRunner, context) { _weakReference = new WeakReference(actionAsync); }
/// <summary> /// Initializes a new instance of the <see cref="OneWayAsyncStrongSubscription" /> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="actionAsync">The action asynchronous.</param> /// <param name="context">The context.</param> public OneWayAsyncStrongSubscription(IAsyncActionRunner asyncActionRunner, Func <INotificationMessage, Task> actionAsync, string context) : base(asyncActionRunner, context) { _actionAsync = actionAsync; }
/// <summary> /// Initializes a new instance of the <see cref="AsyncSubscription"/> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="context">The context.</param> protected AsyncSubscription(IAsyncActionRunner asyncActionRunner, string context) { _asyncActionRunner = asyncActionRunner; Context = string.IsNullOrEmpty(context) ? DefaultContext : context; _id = Guid.NewGuid(); }
/// <summary> /// Initializes a new instance of the <see cref="TwoWayAsyncSubscription{TResult}" /> class. /// </summary> /// <param name="asyncActionRunner">The asynchronous action runner.</param> /// <param name="context">The context.</param> protected TwoWayAsyncSubscription(IAsyncActionRunner <TResult> asyncActionRunner, string context) : base(asyncActionRunner, context) { }