Class HashTag
- Namespace
- idunno.Bluesky.RichText
- Assembly
- idunno.Bluesky.dll
Provides an object representation of a hash tag in a Bluesky post.
public record HashTag : PostBuilderFacetFeature, IEquatable<PostBuilderFacetFeature>, IEquatable<HashTag>Inheritance
Implements
Inherited Members
Constructors
HashTag(string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
Remarks
The lexicon limits apply to tag itself, not to the text it renders as, so a tag
of the maximum allowed length is still valid once its '#' prefix is added.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(string, string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag, string text)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
textstring-
The text to wrap the hashtag around, if any. The text usually includes a '#' prefix.
Remarks
If text is not specified the tag will be used as the facet feature text.
The lexicon limits apply to tag only. text is the text the tag
renders as, and so counts towards the length of the post rather than the length of the tag.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(HashTag)
protected HashTag(HashTag original)Parameters
originalHashTag
HashTag(string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
Remarks
The lexicon limits apply to tag itself, not to the text it renders as, so a tag
of the maximum allowed length is still valid once its '#' prefix is added.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(string, string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag, string text)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
textstring-
The text to wrap the hashtag around, if any. The text usually includes a '#' prefix.
Remarks
If text is not specified the tag will be used as the facet feature text.
The lexicon limits apply to tag only. text is the text the tag
renders as, and so counts towards the length of the post rather than the length of the tag.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(HashTag)
protected HashTag(HashTag original)Parameters
originalHashTag
HashTag(string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
Remarks
The lexicon limits apply to tag itself, not to the text it renders as, so a tag
of the maximum allowed length is still valid once its '#' prefix is added.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(string, string)
Creates a new instance of idunno.Bluesky.RichText.HashTag.
public HashTag(string tag, string text)Parameters
tagstring-
The hash tag to add to a post. Do not include the '#' prefix except in the case of 'double hash tags'.
textstring-
The text to wrap the hashtag around, if any. The text usually includes a '#' prefix.
Remarks
If text is not specified the tag will be used as the facet feature text.
The lexicon limits apply to tag only. text is the text the tag
renders as, and so counts towards the length of the post rather than the length of the tag.
Exceptions
- ArgumentException
-
if
tagis null or white space. - ArgumentOutOfRangeException
-
If
tagis longer than the allowed maximum.
HashTag(HashTag)
protected HashTag(HashTag original)Parameters
originalHashTag
Properties
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Tag
Gets the hash tag for this facet feature.
public string Tag { get; init; }Property Value
Tag
Gets the hash tag for this facet feature.
public string Tag { get; init; }Property Value
Tag
Gets the hash tag for this facet feature.
public string Tag { get; init; }Property Value
Methods
<Clone>$()
public override HashTag <Clone>$()Returns
<Clone>$()
public override HashTag <Clone>$()Returns
<Clone>$()
public override HashTag <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(PostBuilderFacetFeature?)
public override sealed bool Equals(PostBuilderFacetFeature? other)Parameters
otherPostBuilderFacetFeature?
Returns
Equals(HashTag?)
public virtual bool Equals(HashTag? other)Parameters
otherHashTag?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(PostBuilderFacetFeature?)
public override sealed bool Equals(PostBuilderFacetFeature? other)Parameters
otherPostBuilderFacetFeature?
Returns
Equals(HashTag?)
public virtual bool Equals(HashTag? other)Parameters
otherHashTag?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(PostBuilderFacetFeature?)
public override sealed bool Equals(PostBuilderFacetFeature? other)Parameters
otherPostBuilderFacetFeature?
Returns
Equals(HashTag?)
public virtual bool Equals(HashTag? other)Parameters
otherHashTag?
Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
The text of the facet, or an empty string if the facet has no text.
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
The text of the facet, or an empty string if the facet has no text.
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
The text of the facet, or an empty string if the facet has no text.
Operators
operator ==(HashTag?, HashTag?)
public static bool operator ==(HashTag? left, HashTag? right)Parameters
Returns
operator ==(HashTag?, HashTag?)
public static bool operator ==(HashTag? left, HashTag? right)Parameters
Returns
operator ==(HashTag?, HashTag?)
public static bool operator ==(HashTag? left, HashTag? right)Parameters
Returns
operator !=(HashTag?, HashTag?)
public static bool operator !=(HashTag? left, HashTag? right)Parameters
Returns
operator !=(HashTag?, HashTag?)
public static bool operator !=(HashTag? left, HashTag? right)Parameters
Returns
operator !=(HashTag?, HashTag?)
public static bool operator !=(HashTag? left, HashTag? right)