XmlResolver.GetEntityAsync(Uri, String, Type) 方法

定义

将 URI 异步映射到包含实际资源的对象。Asynchronously maps a URI to an object that contains the actual resource.

public:
 virtual System::Threading::Tasks::Task<System::Object ^> ^ GetEntityAsync(Uri ^ absoluteUri, System::String ^ role, Type ^ ofObjectToReturn);
public virtual System.Threading.Tasks.Task<object> GetEntityAsync (Uri absoluteUri, string? role, Type? ofObjectToReturn);
public virtual System.Threading.Tasks.Task<object> GetEntityAsync (Uri absoluteUri, string role, Type ofObjectToReturn);
abstract member GetEntityAsync : Uri * string * Type -> System.Threading.Tasks.Task<obj>
override this.GetEntityAsync : Uri * string * Type -> System.Threading.Tasks.Task<obj>
Public Overridable Function GetEntityAsync (absoluteUri As Uri, role As String, ofObjectToReturn As Type) As Task(Of Object)

参数

absoluteUri
Uri

ResolveUri(Uri, String) 返回的 URI。The URI returned from ResolveUri(Uri, String).

role
String

当前未使用。Currently not used.

ofObjectToReturn
Type

要返回的对象的类型。The type of object to return. 当前版本只返回 Stream 对象。The current version only returns Stream objects.

返回

Task<Object>

流对象;如果指定了流以外的类型,则为 nullA stream object or null if a type other than stream is specified.

注解

这是的异步版本 GetEntity ,具有相同的功能。This is the asynchronous version of GetEntity, with the same functionality. 若要使用此方法,必须将 Async 标志设置为 trueTo use this method, you must set the Async flag to true.

适用于

另请参阅