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!

WebRequestFactory.RegisterPrefix

Registers a WebRequest descendent with the WebRequestFactory for a specific Uniform Resource Identifier.

[Visual Basic]
Public Shared Function RegisterPrefix( _
   ByVal Prefix As String, _
   ByVal Creator As IWebRequestCreate _
) As Boolean
[C#]
public static bool RegisterPrefix(
   string Prefix,
   IWebRequestCreate Creator
);
[C++]
public: static bool RegisterPrefix(
   String* Prefix,
   IWebRequestCreate* Creator
);
[JScript]
public static function RegisterPrefix(
   Prefix : String,
   Creator : IWebRequestCreate
) : Boolean;

Parameters

Prefix
The URI prefix this WebRequest descendent will service.
Creator
The create method the WebRequestFactory should call to create the WebRequest descendent.

Return Value

true if registration was successful; otherwise, false.

Remarks

Duplicate prefixes are not allowed. RegisterPrefix will return false if an attempt is made to register a duplicate prefix.

Note   The HttpWebRequest class is registered to service requests for the http and https schemes by default. Attempts to register a different WebRequest descendent for these schemes will fail.

See Also

WebRequestFactory Class | WebRequestFactory Members | System.Net Namespace