Table of Contents

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)

Constructs an ASUri by wrapping an existing native Uri.

public ASUri(Uri uri)

Parameters

uri Uri

Properties

Uri

Parsed and expanded URI value of this object.

public Uri Uri { get; }

Property Value

Uri

Methods

AreEqual(ASUri?, ASUri?)

Compares two ASUri objects for equality.

public static bool AreEqual(ASUri? left, ASUri? right)

Parameters

left ASUri
right ASUri

Returns

bool

AreEqual(ASUri?, string?)

Compares an ASUri against a string.

public static bool AreEqual(ASUri? left, string? right)

Parameters

left ASUri
right string

Returns

bool

AreEqual(ASUri?, Uri?)

Compares an ASUri against a native Uri.

public static bool AreEqual(ASUri? left, Uri? right)

Parameters

left ASUri
right Uri

Returns

bool

Equals(ASUri?)

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

public bool Equals(ASUri? other)

Parameters

other ASUri

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.

Equals(string?)

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

public bool Equals(string? other)

Parameters

other string

An object to compare with this object.

Returns

bool

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

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.

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

left ASUri
right ASUri

Returns

bool

operator ==(ASUri?, string?)

Compares an ASUri against a string.

public static bool operator ==(ASUri? left, string? right)

Parameters

left ASUri
right string

Returns

bool

operator ==(ASUri?, Uri?)

Compares an ASUri against a native Uri.

public static bool operator ==(ASUri? left, Uri? right)

Parameters

left ASUri
right Uri

Returns

bool

implicit operator string(ASUri)

Parses an ASUri from a string

public static implicit operator string(ASUri asUri)

Parameters

asUri ASUri

Returns

string

implicit operator Uri(ASUri)

Converts an ASUri into a native Uri

public static implicit operator Uri(ASUri asUri)

Parameters

asUri ASUri

Returns

Uri

implicit operator ASUri(string)

Converts this ASUri to its string value

public static implicit operator ASUri(string str)

Parameters

str string

Returns

ASUri

implicit operator ASUri(Uri)

Converts a native Uri into a an ASUri

public static implicit operator ASUri(Uri uri)

Parameters

uri Uri

Returns

ASUri

operator !=(ASUri?, ASUri?)

Compares two ASUri objects for equality.

public static bool operator !=(ASUri? left, ASUri? right)

Parameters

left ASUri
right ASUri

Returns

bool

operator !=(ASUri?, string?)

Compares an ASUri against a string.

public static bool operator !=(ASUri? left, string? right)

Parameters

left ASUri
right string

Returns

bool

operator !=(ASUri?, Uri?)

Compares an ASUri against a native Uri.

public static bool operator !=(ASUri? left, Uri? right)

Parameters

left ASUri
right Uri

Returns

bool