Class ASUri
- Namespace
- ActivityPub.Types.Util
- Assembly
- ActivityPub.Types.dll
Synthetic type to represent a URI or IRI as used in ActivityStreams. Currently, this only handles "true" non-compacted URIs.
[JsonConverter(typeof(ASUriConverter))]
public class ASUri : IEquatable<ASUri>, IEquatable<Uri>, IEquatable<string>
- Inheritance
-
ASUri
- Implements
- Inherited Members
Constructors
ASUri(string)
Constructs an ASUri by parsing a string.
public ASUri(string uri)
Parameters
uri
string
ASUri(Uri)
public ASUri(Uri uri)
Parameters
uri
Uri
Properties
Uri
Parsed and expanded URI value of this object.
public Uri Uri { get; }
Property Value
Methods
AreEqual(ASUri?, ASUri?)
Compares two ASUri objects for equality.
public static bool AreEqual(ASUri? left, ASUri? right)
Parameters
Returns
AreEqual(ASUri?, string?)
public static bool AreEqual(ASUri? left, string? right)
Parameters
Returns
AreEqual(ASUri?, Uri?)
public static bool AreEqual(ASUri? left, Uri? right)
Parameters
Returns
Equals(ASUri?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ASUri? other)
Parameters
other
ASUriAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(string?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(string? other)
Parameters
other
stringAn object to compare with this object.
Returns
Equals(Uri?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Uri? other)
Parameters
other
UriAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(ASUri?, ASUri?)
Compares two ASUri objects for equality.
public static bool operator ==(ASUri? left, ASUri? right)
Parameters
Returns
operator ==(ASUri?, string?)
public static bool operator ==(ASUri? left, string? right)
Parameters
Returns
operator ==(ASUri?, Uri?)
public static bool operator ==(ASUri? left, Uri? right)
Parameters
Returns
implicit operator string(ASUri)
public static implicit operator string(ASUri asUri)
Parameters
asUri
ASUri
Returns
implicit operator Uri(ASUri)
public static implicit operator Uri(ASUri asUri)
Parameters
asUri
ASUri
Returns
implicit operator ASUri(string)
public static implicit operator ASUri(string str)
Parameters
str
string
Returns
implicit operator ASUri(Uri)
public static implicit operator ASUri(Uri uri)
Parameters
uri
Uri
Returns
operator !=(ASUri?, ASUri?)
Compares two ASUri objects for equality.
public static bool operator !=(ASUri? left, ASUri? right)
Parameters
Returns
operator !=(ASUri?, string?)
public static bool operator !=(ASUri? left, string? right)
Parameters
Returns
operator !=(ASUri?, Uri?)
public static bool operator !=(ASUri? left, Uri? right)