JniRuntime.ReflectionJniValueManager.GetValueCore 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 |
|---|---|
| GetValueCore(JniObjectReference, JniObjectReferenceOptions, Type) |
Reuses a compatible existing mapped value before selecting a converter. |
| GetValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
Reuses a compatible mapped value or converts it to the requested managed type. |
GetValueCore(JniObjectReference, JniObjectReferenceOptions, Type)
Reuses a compatible existing mapped value before selecting a converter.
protected override object? GetValueCore(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
override this.GetValueCore : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> obj
Parameters
- reference
- JniObjectReference
The source JNI reference to convert.
- options
- JniObjectReferenceOptions
Source-reference transfer options.
- targetType
- Type
The optional managed target type; otherwise, the runtime type is used.
Returns
The reused or converted value, or null for a zero reference.
Remarks
Source disposal options also apply when an existing value is reused.
Applies to
GetValueCore<T>(JniObjectReference, JniObjectReferenceOptions, Type)
Reuses a compatible mapped value or converts it to the requested managed type.
protected override T GetValueCore<T>(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
override this.GetValueCore : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> 'T
Type Parameters
- T
The managed result type.
Parameters
- reference
- JniObjectReference
The source JNI reference to convert.
- options
- JniObjectReferenceOptions
Source-reference transfer options.
- targetType
- Type
The requested compatible runtime target, or typeof(T) when null.
Returns
The reused or converted typed value, or default(T) for a zero reference.
Remarks
A requested targetType must be assignable to T.