Beispiel #1
0
        public void DelegateConvert()
        {
            tested.TestDelegate del = JavaCallStaticMethods._class.Invoke <tested.TestDelegate>("testDelegate", "()Lnet/sf/jni4net/tested/TestDelegate;");
            Assert.IsNotNull(del);
            var res = del.Invoke(1, "ahoj");

            Assert.AreEqual("ahoj1", res);
        }
Beispiel #2
0
        public void DelegateCallback()
        {
            tested.TestDelegate td = TestDelegateImpl;
            Object del             = Bridge.WrapCLR(td);

            Assert.IsNotNull(del);

            object res = del.Invoke <object>("Invoke", "(ILjava/lang/String;)Lsystem/Object;", 1, "ahoj");

            Assert.AreEqual("ahoj1", res);
        }