Exemplo n.º 1
0
 public TestClass()
 {
     foreach (MethodInfo method in this.GetType().GetMethods())
     {
         if (TestAttribute.IsTest(method))
         {
             TestDelegate newDelegate = (TestDelagate)Delegate.CreateDelegate(typeof(TestDelagate), null, method);
             delegates.Add(newDelegate);
             //Invocation:
             newDelegate.DynamicInvoke(this, "hello");
         }
     }
 }