MockContext.GetSystemServiceName(Class) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
引发 UnsupportedOperationException。 重写此方法以在测试中查找系统服务名称。
[Android.Runtime.Register("getSystemServiceName", "(Ljava/lang/Class;)Ljava/lang/String;", "GetGetSystemServiceName_Ljava_lang_Class_Handler", ApiSince=23)]
public override string? GetSystemServiceName(Java.Lang.Class? serviceClass);
[<Android.Runtime.Register("getSystemServiceName", "(Ljava/lang/Class;)Ljava/lang/String;", "GetGetSystemServiceName_Ljava_lang_Class_Handler", ApiSince=23)>]
override this.GetSystemServiceName : Java.Lang.Class -> string
参数
- serviceClass
- Class
请求的系统服务的类。 可用于测试重写;默认的模拟实现不使用此参数。
返回
不返回任何值。 默认模拟实现引发 UnsupportedOperationException;重写此方法以提供测试结果。
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。