語言

MockPackageManager.GetText(String, Int32, ApplicationInfo) 方法

定義

呼叫 GetTextFormatted 並將結果轉換成字串。 預設的模擬實作會拋 UnsupportedOperationException出 。

public string? GetText(string? packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
override this.GetText : string * int * Android.Content.PM.ApplicationInfo -> string

參數

packageName
String

套件名稱。 傳入 GetTextFormatted;其預設模擬實作不使用此參數。

resid
Int32

資源識別碼。 傳入 GetTextFormatted;其預設模擬實作不使用此參數。

appInfo
ApplicationInfo

資源的申請資訊。 傳入 GetTextFormatted;其預設模擬實作不使用此參數。

傳回

預設的 mock 不會回傳任何值。 此包裝器呼叫 GetTextFormatted,其預設實作拋 UnsupportedOperationException出 。

備註

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

適用於