语言

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

定义

从包中检索 XML 文件。

[Android.Runtime.Register("getXml", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/content/res/XmlResourceParser;", "GetGetXml_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")]
public override System.Xml.XmlReader? GetXml(string? packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
[<Android.Runtime.Register("getXml", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Landroid/content/res/XmlResourceParser;", "GetGetXml_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")>]
override this.GetXml : string * int * Android.Content.PM.ApplicationInfo -> System.Xml.XmlReader

参数

packageName
String

此 xml 所来自的包的名称。 不能为 null。

resid
Int32

所需 xml 的资源标识符。 不能为 0。

appInfo
ApplicationInfo

有关 <var>packageName</var> 的总体信息。 这可能为 null,在这种情况下,将根据需要检索应用程序信息;如果已经有此信息,可以更高效地在此处提供这些信息。

返回

不返回任何值。 默认模拟实现引发 UnsupportedOperationException;重写此方法以提供测试结果。

特性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于