Ejemplo n.º 1
0
 public ProducerBlock(
     BlockHeader header,
     LinkRouterBase <T> router,
     ProducerBlockActionBase <T> action,
     FlowProducerDefinition <T> definition) : base(header, definition.Settings, router)
 {
     _action = action;
 }
Ejemplo n.º 2
0
        protected void AddProducer <T>(FlowProducerDefinition <T> definition, ProducerBlockActionBase <T> action)
        {
            BlockHeader header = new BlockHeader(definition.BlockInfo, Definition.ServiceInfo);

            action.Header  = header;
            action.Context = definition.Settings.Context;

            definition.Settings.Type       = _flowType;
            definition.Settings.Iterations = _iterations;

            if (action.Logger == null)
            {
                action.Logger = Logger;
            }

            LinkRouterBase <T> router = GetLinkFromProducerType <T>(definition.Settings.ProducerType);
            ProducerBlock <T>  block  = new ProducerBlock <T>(header, router, action, definition);

            AssignLoggers(block);
            _blockContainer.AddProducer(block);
        }
Ejemplo n.º 3
0
        public override void AddProducer <T>(FlowProducerDefinition <T> definition)
        {
            ProducerBlockActionBase <T> action = _actionFactory.CreateProducerAction <T>(definition.ActionType);

            AddProducer(definition, action);
        }
Ejemplo n.º 4
0
 public abstract void AddProducer <T>(FlowProducerDefinition <T> definition);