Beispiel #1
0
        internal Topology(Dictionary <int, List <string> > levels, Dictionary <string, DependItem> list, DependItem mashupItem, ITopologyContainer container)
        {
            this.userInput = new UserInput();
            this.boltList  = new Dictionary <string, BoltExcuter>();
            this.container = container;
            this.levelList = new Dictionary <int, List <BoltExcuter> >();
            foreach (var level in levels)
            {
                levelList.Add(level.Key, this.CreateLevel(level.Value, list));
            }

            IInputs mashupInput = null;

            if (levels.Count > 0)
            {
                mashupInput = new InputCollection(mashupItem.Previous, boltList);
            }
            else
            {
                mashupInput = this.userInput;
            }
            var mashup = (IMashup)Activator.CreateInstance(mashupItem.Type);

            if (mashup is MashupDelegate)
            {
                ((MashupDelegate)mashup).SetAction(mashupItem.MashupFunction);
            }

            this.mashupExcuter = new MashupExcuter(mashup, mashupInput);
        }
Beispiel #2
0
 public void AddDependOn(DependItem b)
 {
     this.DependOns.Add(b);
 }