JniRuntime.JniTypeManager.TryRegisterNativeMembers Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| TryRegisterNativeMembers(JniType, Type, ReadOnlySpan<Char>) |
Tries generated registration callbacks before attributed registration methods. |
| TryRegisterNativeMembers(JniType, Type, String) |
Obsolete.
Tries generated or attributed native registration with a method description. |
TryRegisterNativeMembers(JniType, Type, ReadOnlySpan<Char>)
Tries generated registration callbacks before attributed registration methods.
protected bool TryRegisterNativeMembers(Java.Interop.JniType nativeClass, Type type, ReadOnlySpan<char> methods);
member this.TryRegisterNativeMembers : Java.Interop.JniType * Type * ReadOnlySpan<char> -> bool
Parameters
- nativeClass
- JniType
The Java class to receive collected native registrations.
- type
- Type
The managed type to inspect for registration callbacks.
- methods
- ReadOnlySpan<Char>
A compatibility input ignored by this overload.
Returns
true when a registration callback was found; otherwise, false.
Remarks
This span overload passes no method-description string to callbacks. A found callback can return no registrations and still produce true.
Applies to
TryRegisterNativeMembers(JniType, Type, String)
Caution
Use RegisterNativeMembers(JniType, Type, ReadOnlySpan<char>)
Tries generated or attributed native registration with a method description.
[System.Obsolete("Use RegisterNativeMembers(JniType, Type, ReadOnlySpan<char>)")]
protected bool TryRegisterNativeMembers(Java.Interop.JniType nativeClass, Type type, string? methods);
[<System.Obsolete("Use RegisterNativeMembers(JniType, Type, ReadOnlySpan<char>)")>]
member this.TryRegisterNativeMembers : Java.Interop.JniType * Type * string -> bool
Parameters
- nativeClass
- JniType
The Java class to receive collected native registrations.
- type
- Type
The managed type to inspect for registration callbacks.
- methods
- String
The optional string forwarded in registration callback arguments.
Returns
true when a registration callback was found; otherwise, false.
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.