When overridden in a derived class, maps a URI to an object containing the actual resource.
Public MustOverride Function GetEntity ( _ absoluteUri As Uri, _ role As String, _ ofObjectToReturn As Type _ ) As Object
Dim instance As XmlResolver Dim absoluteUri As Uri Dim role As String Dim ofObjectToReturn As Type Dim returnValue As Object returnValue = instance.GetEntity(absoluteUri, _ role, ofObjectToReturn)
public abstract Object GetEntity( Uri absoluteUri, string role, Type ofObjectToReturn )
public: virtual Object^ GetEntity( Uri^ absoluteUri, String^ role, Type^ ofObjectToReturn ) abstract
public abstract function GetEntity( absoluteUri : Uri, role : String, ofObjectToReturn : Type ) : Object
ofObjectToReturn is not a Stream type.
The specified URI is not an absolute URI.
absoluteUri is nullNothingnullptra null reference (Nothing in Visual Basic).
There is a runtime error (for example, an interrupted server connection).
This method is used when the caller wants to map a given URI into the object containing the actual resource that the URI represents. The type of object returned is negotiable; however, the implementation must always support System.IO.Stream.
Your application can mitigate memory Denial of Service threats to the GetEntity method by implementing a wrapping implemented IStream that limits the number of bytes read. This helps to guard against situations where malicious code attempts to pass an infinite stream of bytes to the GetEntity method.
See XmlUrlResolver..::.GetEntity for an example using this method.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune