語言

ContextWrapper.StartInstrumentation(ComponentName, String, Bundle) 方法

定義

開始執行一個 Instrumentation 類別。

[Android.Runtime.Register("startInstrumentation", "(Landroid/content/ComponentName;Ljava/lang/String;Landroid/os/Bundle;)Z", "GetStartInstrumentation_Landroid_content_ComponentName_Ljava_lang_String_Landroid_os_Bundle_Handler")]
public override bool StartInstrumentation(Android.Content.ComponentName? className, string? profileFile, Android.OS.Bundle? arguments);
[<Android.Runtime.Register("startInstrumentation", "(Landroid/content/ComponentName;Ljava/lang/String;Landroid/os/Bundle;)Z", "GetStartInstrumentation_Landroid_content_ComponentName_Ljava_lang_String_Landroid_os_Bundle_Handler")>]
override this.StartInstrumentation : Android.Content.ComponentName * string * Android.OS.Bundle -> bool

參數

className
ComponentName

要執行的儀器元件名稱。

profileFile
String

可選路徑在儀器執行時寫入剖析資料,或為空路徑表示不剖析。

arguments
Bundle

額外的可選參數可傳遞給儀器,或稱為空。

傳回

如果儀器成功啟動,則為 false,若找不到儀器。

屬性

備註

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

Java 文件 android.content.ContextWrapper.startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)

適用於