Bewerken

Share via


UriParser.Register(UriParser, String, Int32) Method

Definition

Associates a scheme and port number with a UriParser.

public:
 static void Register(UriParser ^ uriParser, System::String ^ schemeName, int defaultPort);
public static void Register (UriParser uriParser, string schemeName, int defaultPort);
static member Register : UriParser * string * int -> unit
Public Shared Sub Register (uriParser As UriParser, schemeName As String, defaultPort As Integer)

Parameters

uriParser
UriParser

The URI parser to register.

schemeName
String

The name of the scheme that is associated with this parser.

defaultPort
Int32

The default port number for the specified scheme.

Exceptions

uriParser parameter is null

-or-

schemeName parameter is null.

schemeName parameter is not valid

-or-

defaultPort parameter is not valid. The defaultPort parameter is less than -1 or greater than 65,534.

Remarks

If the defaultPort parameter is set to -1, the Register method registers no default value for the port number.

Applies to