Exemplo n.º 1
0
        /// <summary>
        /// Provides actual stage logic
        /// </summary>
        /// <param name="shape">Shape of the stage</param>
        /// <param name="inheritedAttributes">Stage attributes</param>
        /// <returns>Stage logic</returns>
        protected override (GraphStageLogic, IControl) Logic(SourceShape <ConsumeResult <K, V> > shape, Attributes inheritedAttributes)
        {
            var logic = new SingleSourceStageLogic <K, V, ConsumeResult <K, V> >(shape, Settings, Subscription, inheritedAttributes,
                                                                                 _ => new PlainMessageBuilder <K, V>());

            return(logic, logic.Control);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Provides actual stage logic
        /// </summary>
        /// <param name="shape">Shape of the stage</param>
        /// <param name="inheritedAttributes">Stage attributes</param>
        /// <returns>Stage logic</returns>
        protected override (GraphStageLogic, IControl) Logic(SourceShape <CommittableMessage <K, V> > shape, Attributes inheritedAttributes)
        {
            var logic = new SingleSourceStageLogic <K, V, CommittableMessage <K, V> >(shape, Settings, Subscription, inheritedAttributes, GetMessageBuilder);

            return(logic, logic.Control);
        }