Exemplo n.º 1
0
        /// <summary>
        ///     Removes the action.
        /// </summary>
        /// <param name="action">The action.</param>
        public virtual void RemoveAction(ThreadedMessageAction action)
        {
            var thisAction = Actions.FirstOrDefault(act => act.Equals(action));

            if (thisAction != null)
            {
                Actions.Remove(thisAction);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Adds the action.
 /// </summary>
 /// <param name="messageAction">The message action.</param>
 public virtual void AddAction(ThreadedMessageAction messageAction)
 {
     Actions.Add(messageAction);
 }
Exemplo n.º 3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SubscriberAndActions" /> class.
 /// </summary>
 /// <param name="subscriber">The subscriber.</param>
 /// <param name="action">The action.</param>
 public SubscriberAndActions(object subscriber, ThreadedMessageAction action)
     : this(subscriber)
 {
     Actions.Add(action);
 }