Esempio n. 1
0
 /// <summary>
 /// Create a new event handler group that combines the consumers in this group with <paramref name="otherHandlerGroup"/>
 /// </summary>
 /// <param name="otherHandlerGroup">the event handler group to combine</param>
 /// <returns>a new EventHandlerGroup combining the existing and new consumers into a single dependency group</returns>
 public EventHandlerGroup <T> And(EventHandlerGroup <T> otherHandlerGroup)
 {
     return(new EventHandlerGroup <T>(_disruptor, _consumerRepository, _sequences.Concat(otherHandlerGroup._sequences)));
 }
        /// <summary>
        /// Create a new event handler group that combines the consumers in this group with <tt>otherHandlerGroup</tt>.
        /// </summary>
        /// <param name="otherHandlerGroup">the event handler group to combine.</param>
        /// <returns>a new EventHandlerGroup combining the existing and new consumers into a single dependency group.</returns>
        public EventHandlerGroup <T> And(EventHandlerGroup <T> otherHandlerGroup)
        {
            var combinedSequences = otherHandlerGroup.sequences.Concat(this.sequences).ToArray();

            return(new EventHandlerGroup <T>(disruptor, consumerRepository, combinedSequences));
        }