C# Class System.Uri

Inheritance: ISerializable
Show file Open project: dotnet/corefx Class Usage Examples

Public Properties

Property Type Description
SchemeDelimiter string
UriSchemeFile string
UriSchemeFtp string
UriSchemeGopher string
UriSchemeHttp string
UriSchemeHttps string
UriSchemeMailto string
UriSchemeNetPipe string
UriSchemeNetTcp string
UriSchemeNews string
UriSchemeNntp string

Private Properties

Property Type Description
AllowIdnStatic bool
CalculateCaseInsensitiveHashCode int
Canonicalize void
CheckAuthorityHelper ushort
CheckAuthorityHelperHandleAnyHostIri void
CheckAuthorityHelperHandleDnsIri void
CheckCanonical Check
CheckForColonInFirstPathSegment bool
CheckForEscapedUnreserved bool
CheckForUnicode bool
CheckKnownSchemes bool
CheckSchemeSyntax ParsingError
CheckSecurity void
CombineUri string
Compress char[]
CreateHelper Uri
CreateHostString void
CreateHostStringHelper string
CreateThis void
CreateThisFromUri void
CreateUri void
CreateUriInfo void
EnsureHostString void
EnsureParseRemaining void
EnsureUriInfo UriInfo
Escape void
EscapeString string
EscapeUnescapeIri string
FindEndOfComponent void
FindEndOfComponent void
GetCanonicalPath char[]
GetCombinedString ParsingError
GetComponentsHelper string
GetEscapedParts string
GetException UriFormatException
GetHostViaCustomSyntax void
GetLocalPath string
GetParts string
GetRelativeSerializationString string
GetUnescapedParts string
GetUriPartsFromUserString string
ISerializable void
InFact bool
InitializeUri void
InternalEscapeString string
InternalIsWellFormedOriginalString bool
IriParsingStatic bool
IsBadFileSystemCharacter bool
IsBaseOfHelper bool
IsExcludedCharacter bool
IsIntranet bool
IsReservedCharacter bool
MakeRelative string
NotAny bool
Parse void
ParseMinimal UriFormatException
ParseRemaining void
ParseScheme ParsingError
ParseSchemeCheckImplicitFile ushort
PathDifference string
PrivateParseMinimal ParsingError
PrivateParseMinimalIri void
ReCreateParts string
ResolveHelper Uri
SetUserDrivenParsing void
StaticInFact bool
StaticIsFile bool
StaticNotAny bool
Unescape string
UnescapeOnly void
Uri System.Globalization
Uri System.Runtime.InteropServices
Uri System.Runtime.InteropServices

Public Methods

Method Description
CheckHostName ( string name ) : UriHostNameType
CheckSchemeName ( string schemeName ) : bool
Compare ( Uri uri1, Uri uri2, UriComponents partsToCompare, UriFormat compareFormat, System.StringComparison comparisonType ) : int
Equals ( object comparand ) : bool
EscapeDataString ( string stringToEscape ) : string
EscapeUriString ( string stringToEscape ) : string
FromHex ( char digit ) : int
GetComponents ( UriComponents components, UriFormat format ) : string
GetHashCode ( ) : int
GetLeftPart ( UriPartial part ) : string
HexEscape ( char character ) : string
HexUnescape ( string pattern, int &index ) : char
IsBaseOf ( Uri uri ) : bool
IsHexDigit ( char character ) : bool
IsHexEncoding ( string pattern, int index ) : bool
IsWellFormedOriginalString ( ) : bool
IsWellFormedUriString ( string uriString, UriKind uriKind ) : bool
MakeRelativeUri ( Uri uri ) : Uri
ToString ( ) : string
TryCreate ( Uri baseUri, Uri relativeUri, Uri &result ) : bool
TryCreate ( Uri baseUri, string relativeUri, Uri &result ) : bool
TryCreate ( string uriString, UriKind uriKind, Uri &result ) : bool
UnescapeDataString ( string stringToUnescape ) : string
Uri ( Uri baseUri, Uri relativeUri ) : System.Runtime.InteropServices
Uri ( Uri baseUri, string relativeUri ) : System.Runtime.InteropServices
Uri ( string uriString ) : System.Runtime.InteropServices
Uri ( string uriString, UriKind uriKind ) : System.Runtime.InteropServices
operator ( ) : bool

Protected Methods

Method Description
GetObjectData ( SerializationInfo serializationInfo, StreamingContext streamingContext ) : void
Uri ( SerializationInfo serializationInfo, StreamingContext streamingContext ) : System.Runtime.InteropServices

Private Methods

Method Description
AllowIdnStatic ( UriParser syntax, Flags flags ) : bool
CalculateCaseInsensitiveHashCode ( string text ) : int
Canonicalize ( ) : void
CheckAuthorityHelper ( char pString, ushort idx, ushort length, ParsingError &err, Flags &flags, UriParser syntax, string &newHost ) : ushort
CheckAuthorityHelperHandleAnyHostIri ( char pString, int startInput, int end, bool iriParsing, bool hasUnicode, UriParser syntax, Flags &flags, string &newHost, ParsingError &err ) : void
CheckAuthorityHelperHandleDnsIri ( char pString, ushort start, int end, int startInput, bool iriParsing, bool hasUnicode, UriParser syntax, string userInfoString, Flags &flags, bool &justNormalized, string &newHost, ParsingError &err ) : void
CheckCanonical ( char str, ushort &idx, ushort end, char delim ) : Check
CheckForColonInFirstPathSegment ( string uriString ) : bool
CheckForEscapedUnreserved ( string data ) : bool
CheckForUnicode ( string data ) : bool
CheckKnownSchemes ( long lptr, ushort nChars, UriParser &syntax ) : bool
CheckSchemeSyntax ( char ptr, ushort length, UriParser &syntax ) : ParsingError
CheckSecurity ( ) : void
CombineUri ( Uri basePart, string relativePart, UriFormat uriFormat ) : string
Compress ( char dest, ushort start, int &destLength, UriParser syntax ) : char[]
CreateHelper ( string uriString, bool dontEscape, UriKind uriKind, UriFormatException &e ) : Uri
CreateHostString ( ) : void
CreateHostStringHelper ( string str, ushort idx, ushort end, Flags &flags, string &scopeId ) : string
CreateThis ( string uri, bool dontEscape, UriKind uriKind ) : void
CreateThisFromUri ( Uri otherUri ) : void
CreateUri ( Uri baseUri, string relativeUri, bool dontEscape ) : void
CreateUriInfo ( Flags cF ) : void
EnsureHostString ( bool allowDnsOptimization ) : void
EnsureParseRemaining ( ) : void
EnsureUriInfo ( ) : UriInfo
Escape ( ) : void
EscapeString ( string str ) : string
EscapeUnescapeIri ( string input, int start, int end, UriComponents component ) : string
FindEndOfComponent ( char str, ushort &idx, ushort end, char delim ) : void
FindEndOfComponent ( string input, ushort &idx, ushort end, char delim ) : void
GetCanonicalPath ( char dest, int &pos, UriFormat formatAs ) : char[]
GetCombinedString ( Uri baseUri, string relativeStr, bool dontEscape, string &result ) : ParsingError
GetComponentsHelper ( UriComponents uriComponents, UriFormat uriFormat ) : string
GetEscapedParts ( UriComponents uriParts ) : string
GetException ( ParsingError err ) : UriFormatException
GetHostViaCustomSyntax ( ) : void
GetLocalPath ( ) : string
GetParts ( UriComponents uriParts, UriFormat formatAs ) : string
GetRelativeSerializationString ( UriFormat format ) : string
GetUnescapedParts ( UriComponents uriParts, UriFormat formatAs ) : string
GetUriPartsFromUserString ( UriComponents uriParts ) : string
ISerializable ( SerializationInfo serializationInfo, StreamingContext streamingContext ) : void
InFact ( Flags flags ) : bool
InitializeUri ( ParsingError err, UriKind uriKind, UriFormatException &e ) : void
InternalEscapeString ( string rawString ) : string
InternalIsWellFormedOriginalString ( ) : bool
IriParsingStatic ( UriParser syntax ) : bool
IsBadFileSystemCharacter ( char character ) : bool
IsBaseOfHelper ( Uri uriLink ) : bool
IsExcludedCharacter ( char character ) : bool
IsIntranet ( string schemeHost ) : bool
IsReservedCharacter ( char character ) : bool
MakeRelative ( Uri toUri ) : string
NotAny ( Flags flags ) : bool
Parse ( ) : void
ParseMinimal ( ) : UriFormatException
ParseRemaining ( ) : void
ParseScheme ( string uriString, Flags &flags, UriParser &syntax ) : ParsingError
ParseSchemeCheckImplicitFile ( char uriString, ushort length, ParsingError &err, Flags &flags, UriParser &syntax ) : ushort
PathDifference ( string path1, string path2, bool compareCase ) : string
PrivateParseMinimal ( ) : ParsingError
PrivateParseMinimalIri ( string newHost, ushort idx ) : void
ReCreateParts ( UriComponents parts, ushort nonCanonical, UriFormat formatAs ) : string
ResolveHelper ( Uri baseUri, Uri relativeUri, string &newUriString, bool &userEscaped, UriFormatException &e ) : Uri
SetUserDrivenParsing ( ) : void
StaticInFact ( Flags allFlags, Flags checkFlags ) : bool
StaticIsFile ( UriParser syntax ) : bool
StaticNotAny ( Flags allFlags, Flags checkFlags ) : bool
Unescape ( string path ) : string
UnescapeOnly ( char pch, int start, int &end, char ch1, char ch2, char ch3 ) : void
Uri ( Flags flags, UriParser uriParser, string uri ) : System.Globalization
Uri ( Uri baseUri, string relativeUri, bool dontEscape ) : System.Runtime.InteropServices
Uri ( string uriString, bool dontEscape ) : System.Runtime.InteropServices

Method Details

CheckHostName() public static method

public static CheckHostName ( string name ) : UriHostNameType
name string
return UriHostNameType

CheckSchemeName() public static method

public static CheckSchemeName ( string schemeName ) : bool
schemeName string
return bool

Compare() public static method

public static Compare ( Uri uri1, Uri uri2, UriComponents partsToCompare, UriFormat compareFormat, System.StringComparison comparisonType ) : int
uri1 Uri
uri2 Uri
partsToCompare UriComponents
compareFormat UriFormat
comparisonType System.StringComparison
return int

Equals() public method

public Equals ( object comparand ) : bool
comparand object
return bool

EscapeDataString() public static method

public static EscapeDataString ( string stringToEscape ) : string
stringToEscape string
return string

EscapeUriString() public static method

public static EscapeUriString ( string stringToEscape ) : string
stringToEscape string
return string

FromHex() public static method

public static FromHex ( char digit ) : int
digit char
return int

GetComponents() public method

public GetComponents ( UriComponents components, UriFormat format ) : string
components UriComponents
format UriFormat
return string

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetLeftPart() public method

public GetLeftPart ( UriPartial part ) : string
part UriPartial
return string

GetObjectData() protected method

protected GetObjectData ( SerializationInfo serializationInfo, StreamingContext streamingContext ) : void
serializationInfo System.Runtime.Serialization.SerializationInfo
streamingContext System.Runtime.Serialization.StreamingContext
return void

HexEscape() public static method

public static HexEscape ( char character ) : string
character char
return string

HexUnescape() public static method

public static HexUnescape ( string pattern, int &index ) : char
pattern string
index int
return char

IsBaseOf() public method

public IsBaseOf ( Uri uri ) : bool
uri Uri
return bool

IsHexDigit() public static method

public static IsHexDigit ( char character ) : bool
character char
return bool

IsHexEncoding() public static method

public static IsHexEncoding ( string pattern, int index ) : bool
pattern string
index int
return bool

IsWellFormedOriginalString() public method

public IsWellFormedOriginalString ( ) : bool
return bool

IsWellFormedUriString() public static method

public static IsWellFormedUriString ( string uriString, UriKind uriKind ) : bool
uriString string
uriKind UriKind
return bool

MakeRelativeUri() public method

public MakeRelativeUri ( Uri uri ) : Uri
uri Uri
return Uri

ToString() public method

public ToString ( ) : string
return string

TryCreate() public static method

public static TryCreate ( Uri baseUri, Uri relativeUri, Uri &result ) : bool
baseUri Uri
relativeUri Uri
result Uri
return bool

TryCreate() public static method

public static TryCreate ( Uri baseUri, string relativeUri, Uri &result ) : bool
baseUri Uri
relativeUri string
result Uri
return bool

TryCreate() public static method

public static TryCreate ( string uriString, UriKind uriKind, Uri &result ) : bool
uriString string
uriKind UriKind
result Uri
return bool

UnescapeDataString() public static method

public static UnescapeDataString ( string stringToUnescape ) : string
stringToUnescape string
return string

Uri() protected method

protected Uri ( SerializationInfo serializationInfo, StreamingContext streamingContext ) : System.Runtime.InteropServices
serializationInfo SerializationInfo
streamingContext StreamingContext
return System.Runtime.InteropServices

Uri() public method

public Uri ( Uri baseUri, Uri relativeUri ) : System.Runtime.InteropServices
baseUri Uri
relativeUri Uri
return System.Runtime.InteropServices

Uri() public method

public Uri ( Uri baseUri, string relativeUri ) : System.Runtime.InteropServices
baseUri Uri
relativeUri string
return System.Runtime.InteropServices

Uri() public method

public Uri ( string uriString ) : System.Runtime.InteropServices
uriString string
return System.Runtime.InteropServices

Uri() public method

public Uri ( string uriString, UriKind uriKind ) : System.Runtime.InteropServices
uriString string
uriKind UriKind
return System.Runtime.InteropServices

operator() public static method

public static operator ( ) : bool
return bool

Property Details

SchemeDelimiter public static property

public static string SchemeDelimiter
return string

UriSchemeFile public static property

public static string UriSchemeFile
return string

UriSchemeFtp public static property

public static string UriSchemeFtp
return string

UriSchemeGopher public static property

public static string UriSchemeGopher
return string

UriSchemeHttp public static property

public static string UriSchemeHttp
return string

UriSchemeHttps public static property

public static string UriSchemeHttps
return string

UriSchemeMailto public static property

public static string UriSchemeMailto
return string

UriSchemeNetPipe public static property

public static string UriSchemeNetPipe
return string

UriSchemeNetTcp public static property

public static string UriSchemeNetTcp
return string

UriSchemeNews public static property

public static string UriSchemeNews
return string

UriSchemeNntp public static property

public static string UriSchemeNntp
return string