Пример #1
0
 /// <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);
 }
Пример #2
0
 /// <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)
 {
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <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)
 {
 }
Пример #5
0
 /// <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)
 {
 }
Пример #6
0
 /// <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);
 }
Пример #7
0
 /// <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;
 }
Пример #8
0
 /// <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();
 }
Пример #9
0
 /// <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)
 {
 }