|
2 | 2 | [Register ("java/code/IMyInterface", "", "java.code.IMyInterfaceInvoker")] |
3 | 3 | public partial interface IMyInterface : IJavaObject, IJavaPeerable { |
4 | 4 | private static readonly JniPeerMembers _members = new JniPeerMembers ("java/code/IMyInterface", typeof (IMyInterface), isInterface: true); |
5 | | - |
| 5 | + |
6 | 6 | // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='DoDeclaration' and count(parameter)=0]" |
7 | 7 | [Register ("DoDeclaration", "()V", "GetDoDeclarationHandler:java.code.IMyInterfaceInvoker, MyAssembly")] |
8 | 8 | void DoDeclaration (); |
9 | | - |
| 9 | + |
10 | 10 | private static Delegate cb_DoDefault; |
11 | | - #pragma warning disable 0169 |
| 11 | +#pragma warning disable 0169 |
12 | 12 | private static Delegate GetDoDefaultHandler () |
13 | 13 | { |
14 | 14 | if (cb_DoDefault == null) |
15 | 15 | cb_DoDefault = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_DoDefault); |
16 | 16 | return cb_DoDefault; |
17 | 17 | } |
| 18 | + |
18 | 19 | private static void n_DoDefault (IntPtr jnienv, IntPtr native__this) |
19 | 20 | { |
20 | 21 | var __this = global::Java.Lang.Object.GetObject<java.code.IMyInterface> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); |
21 | 22 | __this.DoDefault (); |
22 | 23 | } |
23 | | - #pragma warning restore 0169 |
| 24 | +#pragma warning restore 0169 |
| 25 | + |
24 | 26 | // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='DoDefault' and count(parameter)=0]" |
25 | 27 | [Register ("DoDefault", "()V", "GetDoDefaultHandler:java.code.IMyInterface, MyAssembly")] |
26 | 28 | virtual unsafe void DoDefault () |
27 | 29 | { |
28 | 30 | const string __id = "DoDefault.()V"; |
29 | 31 | try { |
30 | | - _members.InstanceMethods.InvokeVirtualVoidMethod (__id, this, null); |
| 32 | + _members.InstanceMethods.InvokeVirtualVoidMethod (__id, this, null); |
31 | 33 | } finally { |
32 | 34 | } |
33 | 35 | } |
34 | | - |
| 36 | + |
35 | 37 | } |
| 38 | + |
36 | 39 | [global::Android.Runtime.Register ("java/code/IMyInterface", DoNotGenerateAcw=true)] |
37 | 40 | internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterface { |
38 | 41 | static readonly JniPeerMembers _members = new JniPeerMembers ("java/code/IMyInterface", typeof (IMyInterfaceInvoker)); |
@@ -63,8 +66,7 @@ internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterf |
63 | 66 | static IntPtr Validate (IntPtr handle) |
64 | 67 | { |
65 | 68 | if (!JNIEnv.IsInstanceOf (handle, java_class_ref)) |
66 | | - throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.", |
67 | | - JNIEnv.GetClassNameFromInstance (handle), "java.code.IMyInterface")); |
| 69 | + throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.", JNIEnv.GetClassNameFromInstance (handle), "java.code.IMyInterface")); |
68 | 70 | return handle; |
69 | 71 | } |
70 | 72 |
|
@@ -108,4 +110,3 @@ internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterf |
108 | 110 | } |
109 | 111 |
|
110 | 112 | } |
111 | | - |
|
0 commit comments