GetEntity()

XmlUrlResolver::GetEntity(SharedPtr<Uri>, String, const TypeInfo&) method

Maps a URI to an object that contains the actual resource.

SharedPtr<Object> System::Xml::XmlUrlResolver::GetEntity(SharedPtr<Uri> absoluteUri, String role, const TypeInfo &ofObjectToReturn) override

Arguments

ParameterTypeDescription
absoluteUriSharedPtr<Uri>The URI returned from XmlResolver::ResolveUri(SharedPtr<Uri>, String) call.
roleStringCurrently not used.
ofObjectToReturnconst TypeInfo&The type of object to return. The current implementation only returns Stream objects.

Return Value

A stream object or nullptr if a type other than stream is specified.

Exceptions

ExceptionDescription
XmlExceptionofObjectToReturn is neither nullptr nor a Stream type.
UriFormatExceptionThe specified URI is not an absolute URI.
ArgumentNullExceptionabsoluteUri is nullptr.
ExceptionThere is a runtime error (for example, an interrupted server connection).

See Also