XmlPreloadedResolver.GetEntityAsync(Uri, String, Type) 方法
定义
将 URI 异步映射到包含实际资源的对象。Asynchronously maps a URI to an object that contains the actual resource.
public:
override System::Threading::Tasks::Task<System::Object ^> ^ GetEntityAsync(Uri ^ absoluteUri, System::String ^ role, Type ^ ofObjectToReturn);
public override System.Threading.Tasks.Task<object> GetEntityAsync (Uri absoluteUri, string? role, Type? ofObjectToReturn);
public override System.Threading.Tasks.Task<object> GetEntityAsync (Uri absoluteUri, string role, Type ofObjectToReturn);
override this.GetEntityAsync : Uri * string * Type -> System.Threading.Tasks.Task<obj>
Public Overrides 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
当解析 URI 时,.NET Framework for Silverlight 的当前版本不使用此参数。The current version of the .NET Framework for Silverlight does not use this parameter when resolving URIs. 提供此参数是为了将来扩展使用。This parameter is provided for future extensibility purposes. 例如,此参数可以映射到 xlink:role 并在其他方案中用作特定于实现的参数。For example, this parameter can be mapped to the xlink:role and used as an implementation-specific argument in other scenarios.
- ofObjectToReturn
- Type
要返回的对象的类型。The type of object to return. 对于已作为 String 添加的 URI,XmlPreloadedResolver 支持 Stream 对象和 TextReader 对象。The XmlPreloadedResolver supports Stream objects and TextReader objects for URIs that were added as String. 如果冲突解决程序不支持请求的类型,则引发异常。If the requested type is not supported by the resolver, an exception will be thrown. 使用 SupportsType(Uri, Type) 方法可以确定此解析程序是否支持某个 Type。Use the SupportsType(Uri, Type) method to determine whether a certain Type is supported by this resolver.
返回
Stream 或 TextReader 对象对应的实际源。A Stream or TextReader object that corresponds to the actual source.