UriParser.Register(UriParser, String, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
.NET