public void TestDynamicLoad2_2() { var prof = new DyanmicLoadGenericObject(); var inst = new DyanmicLoadGenericObject(); CSCRuleEngineBL.CodeProject.DynamicLoad2 dl2 = new DynamicLoad2(); string s = null; using (StreamReader sr = new StreamReader("CodeTest.txt")) { s = sr.ReadToEnd(); } var ret = dl2.Test2(s); List <TempRules> biggerList = new List <TempRules>(); for (int i = 0; i < 1000; i++) { biggerList.AddRange(ret); } Stopwatch sw = new Stopwatch(); sw.Start(); foreach (var tempRulese in biggerList) { var claim1 = tempRulese.ruleRun1(prof); var claim2 = tempRulese.ruleRun1(inst); if (claim1 == null && claim2 == null) { Console.WriteLine("Has to be one or the other"); } } sw.Stop(); var t = sw.ElapsedMilliseconds; }
public void TestDynamicLoad2() { CSCRuleEngineBL.CodeProject.DynamicLoad2 dl2 = new DynamicLoad2(); dl2.Test(); }