Parses a new URI scheme. This is an abstract class.
More...
|
static void | Register (UriParser uriParser, string schemeName, int defaultPort) |
| Associates a scheme and port number with a T:System.UriParser. More...
|
|
static bool | IsKnownScheme (string schemeName) |
| Indicates whether the parser for a scheme is registered. More...
|
|
Parses a new URI scheme. This is an abstract class.
Definition at line 9 of file UriParser.cs.
◆ UriParser()
System.UriParser.UriParser |
( |
| ) |
|
|
protected |
Constructs a default URI parser.
Definition at line 122 of file UriParser.cs.
◆ GetComponents()
Gets the components from a URI.
- Parameters
-
uri | The URI to parse. |
components | The T:System.UriComponents to retrieve from uri . |
format | One of the T:System.UriFormat values that controls how special characters are escaped. |
- Returns
- A string that contains the components.
- Exceptions
-
T:System.ArgumentOutOfRangeException | uriFormat is invalid.- or - uriComponents is not a combination of valid T:System.UriComponents values. |
T:System.InvalidOperationException | uri requires user-driven parsing- or - uri is not an absolute URI. Relative URIs cannot be used with this method. |
Definition at line 202 of file UriParser.cs.
◆ InitializeAndValidate()
Initialize the state of the parser and validate the URI.
- Parameters
-
uri | The T:System.Uri to validate. |
parsingError | Validation errors, if any. |
Definition at line 144 of file UriParser.cs.
◆ IsBaseOf()
virtual bool System.UriParser.IsBaseOf |
( |
Uri |
baseUri, |
|
|
Uri |
relativeUri |
|
) |
| |
|
protectedvirtual |
Determines whether baseUri is a base URI for relativeUri .
- Parameters
-
baseUri | The base URI. |
relativeUri | The URI to test. |
- Returns
true
if baseUri is a base URI for relativeUri ; otherwise, false
.
Definition at line 186 of file UriParser.cs.
◆ IsKnownScheme()
static bool System.UriParser.IsKnownScheme |
( |
string |
schemeName | ) |
|
|
static |
Indicates whether the parser for a scheme is registered.
- Parameters
-
schemeName | The scheme name to check. |
- Returns
true
if schemeName has been registered; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | The schemeName parameter is null. |
T:System.ArgumentOutOfRangeException | The schemeName parameter is not valid. |
Definition at line 275 of file UriParser.cs.
◆ IsWellFormedOriginalString()
virtual bool System.UriParser.IsWellFormedOriginalString |
( |
Uri |
uri | ) |
|
|
protectedvirtual |
Indicates whether a URI is well-formed.
- Parameters
-
- Returns
true
if uri is well-formed; otherwise, false
.
Definition at line 227 of file UriParser.cs.
◆ OnNewUri()
virtual UriParser System.UriParser.OnNewUri |
( |
| ) |
|
|
protectedvirtual |
Invoked by a T:System.Uri constructor to get a T:System.UriParser instance
- Returns
- A T:System.UriParser for the constructed T:System.Uri.
Definition at line 129 of file UriParser.cs.
◆ OnRegister()
virtual void System.UriParser.OnRegister |
( |
string |
schemeName, |
|
|
int |
defaultPort |
|
) |
| |
|
protectedvirtual |
Invoked by the Framework when a T:System.UriParser method is registered.
- Parameters
-
schemeName | The scheme that is associated with this T:System.UriParser. |
defaultPort | The port number of the scheme. |
Definition at line 137 of file UriParser.cs.
◆ Register()
static void System.UriParser.Register |
( |
UriParser |
uriParser, |
|
|
string |
schemeName, |
|
|
int |
defaultPort |
|
) |
| |
|
static |
Associates a scheme and port number with a T:System.UriParser.
- Parameters
-
uriParser | The URI parser to register. |
schemeName | The name of the scheme that is associated with this parser. |
defaultPort | The default port number for the specified scheme. |
- Exceptions
-
T:System.ArgumentNullException | uriParser parameter is null- or - schemeName parameter is null. |
T:System.ArgumentOutOfRangeException | schemeName parameter is not valid- or - defaultPort parameter is not valid. The defaultPort parameter is less than -1 or greater than 65,534. |
Definition at line 242 of file UriParser.cs.
◆ Resolve()
Called by T:System.Uri constructors and Overload:System.Uri.TryCreate to resolve a relative URI.
- Parameters
-
baseUri | A base URI. |
relativeUri | A relative URI. |
parsingError | Errors during the resolve process, if any. |
- Returns
- The string of the resolved relative T:System.Uri.
- Exceptions
-
T:System.InvalidOperationException | baseUri parameter is not an absolute T:System.Uri- or - baseUri parameter requires user-driven parsing. |
Definition at line 157 of file UriParser.cs.
The documentation for this class was generated from the following file: