/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="ArrowSender">The sender of the messages/objects.</param> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> /// <param name="Recipient">A recipient of the processed messages.</param> /// <param name="Recipients">Further recipients of the processed messages.</param> public static ActionArrow ActionArrow(this IArrowSender ArrowSender, Action_Object Action, IArrowReceiver Recipient, params IArrowReceiver[] Recipients) { var _ActionArrow = new ActionArrow(Action, Recipient, Recipients); ArrowSender.OnMessageAvailable += _ActionArrow.ReceiveMessage; return(_ActionArrow); }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="ArrowSender">The sender of the messages/objects.</param> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> public static ActionArrow ActionArrow(this IArrowSender ArrowSender, Action_Object Action) { var _ActionArrow = new ActionArrow(Action); ArrowSender.OnMessageAvailable += _ActionArrow.ReceiveMessage; return(_ActionArrow); }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> public ActionArrow(Action_Object Action) { if (Action == null) { throw new ArgumentNullException("The given Action<TIn> must not be null!"); } this.Action = Action; }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> public ActionArrow(Action_Object Action) { if (Action == null) throw new ArgumentNullException("The given Action<TIn> must not be null!"); this.Action = Action; }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> /// <param name="Recipient">A recipient of the processed messages.</param> /// <param name="Recipients">The recipients of the processed messages.</param> public ActionArrow(Action_Object Action, IArrowReceiver Recipient, params IArrowReceiver[] Recipients) : base(Recipient, Recipients) { if (Action == null) { throw new ArgumentNullException("The given Action<TIn> must not be null!"); } this.Action = Action; }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> /// <param name="Recipient">A recipient of the processed messages.</param> /// <param name="Recipients">The recipients of the processed messages.</param> public ActionArrow(Action_Object Action, MessageRecipient Recipient, params MessageRecipient[] Recipients) : base(Recipient, Recipients) { if (Action == null) throw new ArgumentNullException("The given Action<TIn> must not be null!"); this.Action = Action; }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="ArrowSender">The sender of the messages/objects.</param> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> /// <param name="Recipient">A recipient of the processed messages.</param> /// <param name="Recipients">Further recipients of the processed messages.</param> public static ActionArrow ActionArrow(this IArrowSender ArrowSender, Action_Object Action, IArrowReceiver Recipient, params IArrowReceiver[] Recipients) { var _ActionArrow = new ActionArrow(Action, Recipient, Recipients); ArrowSender.OnMessageAvailable += _ActionArrow.ReceiveMessage; return _ActionArrow; }
/// <summary> /// The ActionArrow is much like the IdentityArrow, but calls /// an Action <S> on every accepted message/object before /// forwarding it. /// </summary> /// <param name="ArrowSender">The sender of the messages/objects.</param> /// <param name="Action">An Action <S> to invoke on every accepted message/object before forwarding it.</param> public static ActionArrow ActionArrow(this IArrowSender ArrowSender, Action_Object Action) { var _ActionArrow = new ActionArrow(Action); ArrowSender.OnMessageAvailable += _ActionArrow.ReceiveMessage; return _ActionArrow; }