Class Url

Class Url

Namespace: Aspose.Html
Assembly: Aspose.HTML.dll (25.2.0)

Provides an object representation of a universal identifier (URL).

[ComVisible(true)]
[DOMName("Url")]
[DOMObject]
public class Url : DOMObject, INotifyPropertyChanged

Inheritance

objectDOMObjectUrl

Implements

INotifyPropertyChanged

Inherited Members

DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

Url(string)

Initializes a new instance of the Aspose.Html.Url with the specified URL.

public Url(string url)

Parameters

url string

The URL to process.

Exceptions

TypeError: raised if url cannot be parsed as valid URL.

Url(string, string)

Initializes a new instance of the Aspose.Html.Url with the specified URL and base URL.

public Url(string url, string baseUrl)

Parameters

url string

The URL to process.

baseUrl string

The base URL.

Exceptions

TypeError: raised if url or baseUrl cannot be parsed as valid URL.

Properties

Hash

Gets or sets a string representation for the specified URL hash segment.

[DOMName("hash")]
public string Hash { get; set; }

Property Value

string

Host

Gets or sets a string representation for the specified URL host.

[DOMName("host")]
public string Host { get; set; }

Property Value

string

Hostname

Gets or sets a string representation for the specified URL hostname.

[DOMName("hostname")]
public string Hostname { get; set; }

Property Value

string

Href

Gets or sets a serialized representation for the specified URL instance.

[DOMName("href")]
public string Href { get; set; }

Property Value

string

Exceptions

TypeError: raised if value cannot be parsed as valid URL.

Origin

Gets a string representation for the specified URL origin.

[DOMName("origin")]
public string Origin { get; }

Property Value

string

Password

Gets or sets a string representation for the specified URL password.

[DOMName("password")]
public string Password { get; set; }

Property Value

string

Pathname

Gets or sets a string representation for the specified URL path.

[DOMName("pathname")]
public string Pathname { get; set; }

Property Value

string

Port

Gets or sets a string representation for the specified URL port.

[DOMName("port")]
public string Port { get; set; }

Property Value

string

Protocol

Gets or sets a string representation for the specified URL schema.

[DOMName("protocol")]
public string Protocol { get; set; }

Property Value

string

Search

Gets or sets a string representation for the specified URL search segment.

[DOMName("search")]
public string Search { get; set; }

Property Value

string

SearchParams

Gets an associated Aspose.Html.IUrlSearchParams object.

[DOMName("searchParams")]
public IUrlSearchParams SearchParams { get; }

Property Value

IUrlSearchParams

Username

Gets or sets a string representation for the specified URL username.

[DOMName("username")]
public string Username { get; set; }

Property Value

string

Methods

Equals(object)

Determines whether the specified System.Object, is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The System.Object to compare with this instance.

Returns

bool

true if the specified System.Object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToJson()

Returns a System.String that represents this instance.

[DOMName("toJSON")]
public string ToJson()

Returns

string

A System.String that represents this instance.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

string

A System.String that represents this instance.