Esempio n. 1
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="ArrowSender">The sender of the messages/objects.</param>
        /// <param name="Action">An Action &lt;S&gt; 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);
        }
Esempio n. 2
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="ArrowSender">The sender of the messages/objects.</param>
        /// <param name="Action">An Action &lt;S&gt; 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);
        }
Esempio n. 3
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="Action">An Action &lt;S&gt; 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;
        }
Esempio n. 4
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="Action">An Action &lt;S&gt; 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;

        }
Esempio n. 5
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="Action">An Action &lt;S&gt; 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;
        }
Esempio n. 6
0
        /// <summary>
        /// The ActionArrow is much like the IdentityArrow, but calls
        /// an Action &lt;S&gt; on every accepted message/object before
        /// forwarding it.
        /// </summary>
        /// <param name="Action">An Action &lt;S&gt; 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;

        }
Esempio n. 7
0
 /// <summary>
 /// The ActionArrow is much like the IdentityArrow, but calls
 /// an Action &lt;S&gt; on every accepted message/object before
 /// forwarding it.
 /// </summary>
 /// <param name="ArrowSender">The sender of the messages/objects.</param>
 /// <param name="Action">An Action &lt;S&gt; 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;
 }
Esempio n. 8
0
 /// <summary>
 /// The ActionArrow is much like the IdentityArrow, but calls
 /// an Action &lt;S&gt; on every accepted message/object before
 /// forwarding it.
 /// </summary>
 /// <param name="ArrowSender">The sender of the messages/objects.</param>
 /// <param name="Action">An Action &lt;S&gt; 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;
 }