Exemple #1
0
        public void TypeCbyCLRProxy()
        {
            JInterfacesHelper  h               = new JInterfacesHelper();
            CWithJavaInterface cwc             = h.getCWithJavaInterfaceC(new CWithJavaInterface(0));
            Object             val             = Bridge.WrapCLR(cwc);
            JniGlobalHandle    jniGlobalHandle = ((IClrProxy)val).JvmHandle;
            RegistryRecord     record          = Registry.GetRecord(JNIEnv.ThreadEnv, jniGlobalHandle, val.getClass());

            Assert.IsNotNull(record);
            jniGlobalHandle.HoldThisHandle();
        }
Exemple #2
0
        public void Interfaces1()
        {
            CWithJavaInterface a   = new CWithJavaInterface(4);
            Runnable           cw  = testInstance.getCWithJavaInterface(a);
            CWithJavaInterface cwi = testInstance.getCWithJavaInterfaceC(a);

            cwi.run();
            cw.run();
            CWithJavaInterface tt = cw as CWithJavaInterface;

            Assert.AreEqual(6, tt.Value);
        }