JniRuntime.ReflectionJniTypeManager.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 before attributed callbacks. |
| TryRegisterNativeMembers(JniType, Type, String) |
Obsolete.
Tries native registration with an optional method description. |
TryRegisterNativeMembers(JniType, Type, ReadOnlySpan<Char>)
Tries generated registration before attributed callbacks.
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 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 callback is found; otherwise, false.
Remarks
A callback can be found even if it supplies no native registrations.
Applies to
TryRegisterNativeMembers(JniType, Type, String)
Caution
Use RegisterNativeMembers(JniType, Type, ReadOnlySpan<char>)
Tries native registration with an optional 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 native registrations.
- type
- Type
The managed type to inspect for registration callbacks.
- methods
- String
The optional description forwarded to callback arguments.
Returns
true when a callback is found; otherwise, false.
- Attributes
Remarks
Callback exceptions propagate instead of being converted to false.