Esempio n. 1
0
        public Reaction(string definition)
        {
            var parts  = definition.Split(" => ");
            var inputs = parts[0].Split(", ");
            var output = parts[1];

            foreach (var input in inputs)
            {
                Consumes.Add(new ReactionComponent(input));
            }

            Produces = new ReactionComponent(output);
            Produces.Chemical.SetSynthesis(this);
        }
Esempio n. 2
0
 /// <summary>
 /// Scour with declarative principle
 /// </summary>
 /// <param name="enumerable"></param>
 protected override void ScourCore(IEnumerable <EventBusBaseAttribute> enumerable)
 {
     foreach (var item in enumerable.Where(t => t.GetType() != typeof(EventBusAssemblyScourAttribute)))
     {
         if (item is EventBusEventAttribute)
         {
             Events.Add(item.EventType);
         }
         else if (item is EventBusCommandAttribute)
         {
             Commands.Add(item.EventType);
         }
         else if (item is EventBusConsumerAttribute)
         {
             Consumes.Add(item.EventType);
         }
     }
 }