Table of Contents

Class Uri

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class Uri : BoxedRecord, IEquatable<Uri>
Inheritance
Uri
Implements
Inherited Members

Constructors

Uri(UriOwnedHandle)

public Uri(UriOwnedHandle handle)

Parameters

handle UriOwnedHandle

Properties

Handle

public UriOwnedHandle Handle { get; }

Property Value

UriOwnedHandle

Methods

Build(UriFlags, string, string?, string?, int, string, string?, string?)

[Version("2.66")]
public static Uri Build(UriFlags flags, string scheme, string? userinfo, string? host, int port, string path, string? query, string? fragment)

Parameters

flags UriFlags
scheme string
userinfo string
host string
port int
path string
query string
fragment string

Returns

Uri

BuildWithUser(UriFlags, string, string?, string?, string?, string?, int, string, string?, string?)

[Version("2.66")]
public static Uri BuildWithUser(UriFlags flags, string scheme, string? user, string? password, string? authParams, string? host, int port, string path, string? query, string? fragment)

Parameters

flags UriFlags
scheme string
user string
password string
authParams string
host string
port int
path string
query string
fragment string

Returns

Uri

Equals(Uri?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Uri? other)

Parameters

other Uri

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

ErrorQuark()

public static Quark ErrorQuark()

Returns

Quark

EscapeBytes(Span<byte>, string?)

[Version("2.66")]
public static string EscapeBytes(Span<byte> unescaped, string? reservedCharsAllowed)

Parameters

unescaped Span<byte>
reservedCharsAllowed string

Returns

string

EscapeString(string, string?, bool)

[Version("2.16")]
public static string EscapeString(string unescaped, string? reservedCharsAllowed, bool allowUtf8)

Parameters

unescaped string
reservedCharsAllowed string
allowUtf8 bool

Returns

string

GetAuthParams()

[Version("2.66")]
public string? GetAuthParams()

Returns

string

GetFlags()

[Version("2.66")]
public UriFlags GetFlags()

Returns

UriFlags

GetFragment()

[Version("2.66")]
public string? GetFragment()

Returns

string

GetGType()

public static Type GetGType()

Returns

Type

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetHost()

[Version("2.66")]
public string? GetHost()

Returns

string

GetPassword()

[Version("2.66")]
public string? GetPassword()

Returns

string

GetPath()

[Version("2.66")]
public string GetPath()

Returns

string

GetPort()

[Version("2.66")]
public int GetPort()

Returns

int

GetQuery()

[Version("2.66")]
public string? GetQuery()

Returns

string

GetScheme()

[Version("2.66")]
public string GetScheme()

Returns

string

GetUser()

[Version("2.66")]
public string? GetUser()

Returns

string

GetUserinfo()

[Version("2.66")]
public string? GetUserinfo()

Returns

string

IsValid(string, UriFlags)

[Version("2.66")]
public static bool IsValid(string uriString, UriFlags flags)

Parameters

uriString string
flags UriFlags

Returns

bool

Join(UriFlags, string?, string?, string?, int, string, string?, string?)

[Version("2.66")]
public static string Join(UriFlags flags, string? scheme, string? userinfo, string? host, int port, string path, string? query, string? fragment)

Parameters

flags UriFlags
scheme string
userinfo string
host string
port int
path string
query string
fragment string

Returns

string

JoinWithUser(UriFlags, string?, string?, string?, string?, string?, int, string, string?, string?)

[Version("2.66")]
public static string JoinWithUser(UriFlags flags, string? scheme, string? user, string? password, string? authParams, string? host, int port, string path, string? query, string? fragment)

Parameters

flags UriFlags
scheme string
user string
password string
authParams string
host string
port int
path string
query string
fragment string

Returns

string

ListExtractUris(string)

[Version("2.6")]
public static string[] ListExtractUris(string uriList)

Parameters

uriList string

Returns

string[]

Parse(string, UriFlags)

[Version("2.66")]
public static Uri Parse(string uriString, UriFlags flags)

Parameters

uriString string
flags UriFlags

Returns

Uri

ParseParams(string, long, string, UriParamsFlags)

[Version("2.66")]
public static HashTable ParseParams(string @params, long length, string separators, UriParamsFlags flags)

Parameters

params string
length long
separators string
flags UriParamsFlags

Returns

HashTable

ParseRelative(string, UriFlags)

[Version("2.66")]
public Uri ParseRelative(string uriRef, UriFlags flags)

Parameters

uriRef string
flags UriFlags

Returns

Uri

ParseScheme(string)

[Version("2.16")]
public static string? ParseScheme(string uri)

Parameters

uri string

Returns

string

PeekScheme(string)

[Version("2.66")]
public static string? PeekScheme(string uri)

Parameters

uri string

Returns

string

Ref()

[Version("2.66")]
public Uri Ref()

Returns

Uri

ResolveRelative(string?, string, UriFlags)

[Version("2.66")]
public static string ResolveRelative(string? baseUriString, string uriRef, UriFlags flags)

Parameters

baseUriString string
uriRef string
flags UriFlags

Returns

string

Split(string, UriFlags, out string?, out string?, out string?, out int, out string, out string?, out string?)

[Version("2.66")]
public static bool Split(string uriRef, UriFlags flags, out string? scheme, out string? userinfo, out string? host, out int port, out string path, out string? query, out string? fragment)

Parameters

uriRef string
flags UriFlags
scheme string
userinfo string
host string
port int
path string
query string
fragment string

Returns

bool

SplitNetwork(string, UriFlags, out string?, out string?, out int)

[Version("2.66")]
public static bool SplitNetwork(string uriString, UriFlags flags, out string? scheme, out string? host, out int port)

Parameters

uriString string
flags UriFlags
scheme string
host string
port int

Returns

bool

SplitWithUser(string, UriFlags, out string?, out string?, out string?, out string?, out string?, out int, out string, out string?, out string?)

[Version("2.66")]
public static bool SplitWithUser(string uriRef, UriFlags flags, out string? scheme, out string? user, out string? password, out string? authParams, out string? host, out int port, out string path, out string? query, out string? fragment)

Parameters

uriRef string
flags UriFlags
scheme string
user string
password string
authParams string
host string
port int
path string
query string
fragment string

Returns

bool

ToString()

[Version("2.66")]
public string ToString()

Returns

string

ToStringPartial(UriHideFlags)

[Version("2.66")]
public string ToStringPartial(UriHideFlags flags)

Parameters

flags UriHideFlags

Returns

string

UnescapeBytes(string, long, string?)

[Version("2.66")]
public static Bytes UnescapeBytes(string escapedString, long length, string? illegalCharacters)

Parameters

escapedString string
length long
illegalCharacters string

Returns

Bytes

UnescapeSegment(string?, string?, string?)

[Version("2.16")]
public static string? UnescapeSegment(string? escapedString, string? escapedStringEnd, string? illegalCharacters)

Parameters

escapedString string
escapedStringEnd string
illegalCharacters string

Returns

string

UnescapeString(string, string?)

[Version("2.16")]
public static string? UnescapeString(string escapedString, string? illegalCharacters)

Parameters

escapedString string
illegalCharacters string

Returns

string

Unref()

[Version("2.66")]
public void Unref()