Example #1
0
    public void TestPassAnonymousDelegate()
    {
        var testDelegates = new TestDelegates();
        int value         = testDelegates.MarshalAnonymousDelegate(i => i * 2);

        Assert.AreEqual(2, value);
    }
Example #2
0
 public void TestPassAnonymousDelegate()
 {
     using (var testDelegates = new TestDelegates())
     {
         int value = testDelegates.MarshalAnonymousDelegate(i => i * 2);
         Assert.AreEqual(2, value);
         int value5 = testDelegates.MarshalAnonymousDelegate5(i => i * 2);
         Assert.AreEqual(4, value5);
         int value6 = testDelegates.MarshalAnonymousDelegate6(i => i * 2);
         Assert.AreEqual(6, value6);
     }
 }
Example #3
0
 public void TestPassAnonymousDelegate()
 {
     var testDelegates = new TestDelegates();
     int value = testDelegates.MarshalAnonymousDelegate(i => i * 2);
     Assert.AreEqual(2, value);
 }