語言

MockContext.GetSystemServiceName(Class) 方法

定義

拋出 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出 ;覆寫此方法以提供測試結果。

屬性

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於