Esempio n. 1
0
 public void TestDelegateAndEvent()
 {
     string[] expected =
     {
         "Namespace Test.Namespace",
         "    Partial Public Class TestClass",
         "        Protected Delegate Function TestDelegate(ByVal a As Integer, ByVal b As Integer) As Integer",
         "",
         "        Protected Delegate Sub TestDelegate2()",
         "",
         "        Protected Shared Event TestEvent As TestDelegate2",
         "    End Class",
         "End Namespace"
     };
     ProviderTestUtils.DoVisualBasicTest(expected, ProviderTestUtils.TestDelegateAndEventCompileUnit());
 }
Esempio n. 2
0
 public void TestDelegateAndEvent()
 {
     string[] expected = new string[]
     {
         "namespace Test.Namespace",
         "{",
         "    public partial class TestClass",
         "    {",
         "        protected delegate int TestDelegate(int a, int b);",
         "",
         "        protected delegate void TestDelegate2();",
         "",
         "        protected static event TestDelegate2 TestEvent;",
         "    }",
         "}"
     };
     ProviderTestUtils.DoCSharpTest(expected, ProviderTestUtils.TestDelegateAndEventCompileUnit());
 }