NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlUrlResolver.GetEntity

Maps a URI to an Object containing the actual resource.

[Visual Basic]
Overrides Public Function GetEntity( _
   ByVal baseUri As String, _
   ByVal relativeUri As String, _
   ByVal role As String, _
   ByVal t As Type, _
   ByRef resolvedUri As String _
) As Object
[C#]
public override object GetEntity(
   string baseUri,
   string relativeUri,
   string role,
   Type t,
   ref string resolvedUri
);
[C++]
public: override Object* GetEntity(
   String* baseUri,
   String* relativeUri,
   String* role,
   Type* t,
   String** resolvedUri
);
[JScript]
public override function GetEntity(
   baseUri : String,
   relativeUri : String,
   role : String,
   t : Type,
   resolvedUri : String
) : Object;

Parameters

baseUri
The URI of the resource containing thethat we are trying to resolve. This can be also used by an HTTP resolver as the REFERRER in the HTTP header.
relativeUri
The URI to resolve.
role
A user defined string that gives the XmlResolver some clue as to how the resource is going to be used. This would map to the xlink:role and could be used as an implementation specific argument in other scenarios. In the <!DOCTYPE and <ENTITY case this argument is the PUBLIC identifier.
t
[To be supplied.]
resolvedUri
This URI is returned to the caller and may be different from the initialparameter. It is a way for the resolver to communicate with the caller what the real fully resolved identity of the returned Object actually is. Thiscan then be used as thefor any subsequent requests for resources referenced by this object.

The caller can then use this information to check for circular dependencies. Another use of this might someone who is implementing cross-domain data security policy. The returnedtakes into account any HTTP redirections- which is required for such a security mechanism to be fully secure.

Return Value

Returns the object matching the requested Type or null if the Type is not supported or if the URI is not resolvable.

Exceptions

Exception Type Condition
Exception if there is any sort of runtime error like a connection to a server is down, etc.

Remarks

This method is used when the caller wants to map a given URI into the Object containing the actual resource that that URI represents. The type of object returned is negotiable but the implemention must at least always support System.IO.Stream.

Other implementations may provide even higher level objects representing for even greater efficiency. For example, pre-compiled Schemas for validation or pre-compiled XSL stylesheets for use during transformation.

See Also

XmlUrlResolver Class | XmlUrlResolver Members | System.NewXml Namespace