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
Implements
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
Host
Gets or sets a string representation for the specified URL host.
[DOMName("host")]
public string Host { get; set; }
Property Value
Hostname
Gets or sets a string representation for the specified URL hostname.
[DOMName("hostname")]
public string Hostname { get; set; }
Property Value
Href
Gets or sets a serialized representation for the specified URL instance.
[DOMName("href")]
public string Href { get; set; }
Property Value
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
Password
Gets or sets a string representation for the specified URL password.
[DOMName("password")]
public string Password { get; set; }
Property Value
Pathname
Gets or sets a string representation for the specified URL path.
[DOMName("pathname")]
public string Pathname { get; set; }
Property Value
Port
Gets or sets a string representation for the specified URL port.
[DOMName("port")]
public string Port { get; set; }
Property Value
Protocol
Gets or sets a string representation for the specified URL schema.
[DOMName("protocol")]
public string Protocol { get; set; }
Property Value
Search
Gets or sets a string representation for the specified URL search segment.
[DOMName("search")]
public string Search { get; set; }
Property Value
SearchParams
Gets an associated Aspose.Html.IUrlSearchParams object.
[DOMName("searchParams")]
public IUrlSearchParams SearchParams { get; }
Property Value
Username
Gets or sets a string representation for the specified URL username.
[DOMName("username")]
public string Username { get; set; }
Property Value
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
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
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
A System.String that represents this instance.
ToString()
Returns a System.String that represents this instance.
public override string ToString()
Returns
A System.String that represents this instance.