JniRuntime.JniValueManager.GetValue 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| GetValue(JniObjectReference, JniObjectReferenceOptions, Type) |
通过查找挂钩查找或转换托管值。 |
| GetValue<T>(IntPtr) |
使用传输选项查找或转换原始 JNI 句柄 Copy 。 |
| GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type) |
通过查找挂钩查找或转换类型化托管值。 |
GetValue(JniObjectReference, JniObjectReferenceOptions, Type)
通过查找挂钩查找或转换托管值。
public object? GetValue(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
member this.GetValue : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> obj
参数
- reference
- JniObjectReference
提供给转换实现的 JNI 引用。
- options
- JniObjectReferenceOptions
转发到转换实现的引用传输选项。
- targetType
- Type
可选的托管目标类型。
返回
查找实现生成的现有或转换的值。
注解
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
GetValue<T>(JniObjectReference, JniObjectReferenceOptions, Type)
通过查找挂钩查找或转换类型化托管值。
public T GetValue<T>(ref Java.Interop.JniObjectReference reference, Java.Interop.JniObjectReferenceOptions options, Type? targetType = default);
member this.GetValue : JniObjectReference * Java.Interop.JniObjectReferenceOptions * Type -> 'T
类型参数
- T
托管结果类型。
参数
- reference
- JniObjectReference
提供给转换实现的 JNI 引用。
- options
- JniObjectReferenceOptions
转发到转换实现的引用传输选项。
- targetType
- Type
可选的托管目标类型。
返回
T
查找实现生成的现有或转换的值。
注解
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。