Esempio n. 1
0
 public static CfgBuilder AddAllProductionsInClass <T>(this CfgBuilder cfgBuilder)
 {
     foreach (var production in ProductionRule.LoadAllInClass <T>())
     {
         cfgBuilder.AddProduction(production);
     }
     return(cfgBuilder);
 }
Esempio n. 2
0
        public void LoadAllProductionsFromClass()
        {
            var expected = new[]
            {
                ProductionRule.Load(mFooInfo),
                ProductionRule.Load(mBarInfo)
            };
            var actual = ProductionRule.LoadAllInClass(typeof(A));

            Assert.IsTrue(actual.ToHashSet().SetEquals(expected));
        }