Esempio n. 1
0
 public IBaseComponent retppomponent(ppStage stage, int index)
 {
     foreach (PStage st in _pipeline.Stages)
     {
         if (st.Id == stage.ID)
         {
             IEnumerator enumerator = st.GetComponentEnumerator();
             while (enumerator.MoveNext())
             {
                 if (index-- == 0)
                 {
                     return((IBaseComponent)enumerator.Current);
                 }
             }
         }
     }
     return(null);
 }
Esempio n. 2
0
        protected PStage checkStage(ppStage stage)
        {
            PStage theStage = null;

            foreach (PStage pstage in _pipeline.Stages)
            {
                if (pstage.Id == stage.ID)
                {
                    theStage = pstage;
                    break;
                }
            }
            if (theStage == null)
            {
                theStage = new PStage(stage.Name, stage.ExecuteMethod, stage.ID, _pipeline);
                _pipeline.Stages.Add(theStage);
            }
            return(theStage);
        }
Esempio n. 3
0
        public void Addppomponent(IBaseComponent _component, ppStage _stage)
        {
            if (_component == null)
            {
                throw new ArgumentNullException("No component present");
            }
            if (_stage == null)
            {
                throw new ArgumentNullException(" No stage present");
            }

            if (_stage.IsReceiveStage != _isReceivePipeline)
            {
                throw new ArgumentException("Invalid Stage", "stage");
            }

            PStage theStage = checkStage(_stage);

            theStage.AddComponent(_component);
        }