Class ContentLabelPreference
- Namespace
- idunno.Bluesky.Actor
- Assembly
- idunno.Bluesky.dll
User preferences for a content label.
public sealed record ContentLabelPreference : Preference, IEquatable<Preference>, IEquatable<ContentLabelPreference>Inheritance
Implements
Inherited Members
Constructors
ContentLabelPreference(string, Did?, LabelVisibility)
Creates a new instance of idunno.Bluesky.Actor.ContentLabelPreference.
public ContentLabelPreference(string label, Did? labelerDid, LabelVisibility visibility)Parameters
labelstring-
The label name.
labelerDidDid?-
The idunno.AtProto.Did of the labeler. If null this preference applies globally.
visibilityLabelVisibility-
How the label should be treated in a UI.
Exceptions
- ArgumentException
-
Thrown if
labelis null or white space. - ArgumentOutOfRangeException
-
Thrown if
visibilityis idunno.Bluesky.Actor.LabelVisibility.Unknown.
ContentLabelPreference(string, Did?, LabelVisibility)
Creates a new instance of idunno.Bluesky.Actor.ContentLabelPreference.
public ContentLabelPreference(string label, Did? labelerDid, LabelVisibility visibility)Parameters
labelstring-
The label name.
labelerDidDid?-
The idunno.AtProto.Did of the labeler. If null this preference applies globally.
visibilityLabelVisibility-
How the label should be treated in a UI.
Exceptions
- ArgumentException
-
Thrown if
labelis null or white space. - ArgumentOutOfRangeException
-
Thrown if
visibilityis idunno.Bluesky.Actor.LabelVisibility.Unknown.
ContentLabelPreference(string, Did?, LabelVisibility)
Creates a new instance of idunno.Bluesky.Actor.ContentLabelPreference.
public ContentLabelPreference(string label, Did? labelerDid, LabelVisibility visibility)Parameters
labelstring-
The label name.
labelerDidDid?-
The idunno.AtProto.Did of the labeler. If null this preference applies globally.
visibilityLabelVisibility-
How the label should be treated in a UI.
Exceptions
- ArgumentException
-
Thrown if
labelis null or white space. - ArgumentOutOfRangeException
-
Thrown if
visibilityis idunno.Bluesky.Actor.LabelVisibility.Unknown.
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
Label
The label the preference applies to.
[JsonRequired]
public string Label { get; init; }Property Value
Remarks
Labels are not globally unique, i.e. the same label name can be used by multiple labelers.
Label
The label the preference applies to.
[JsonRequired]
public string Label { get; init; }Property Value
Remarks
Labels are not globally unique, i.e. the same label name can be used by multiple labelers.
Label
The label the preference applies to.
[JsonRequired]
public string Label { get; init; }Property Value
Remarks
Labels are not globally unique, i.e. the same label name can be used by multiple labelers.
LabelerDid
The labeler this preference applies. If null the preference applies globally.
public Did? LabelerDid { get; init; }Property Value
- Did?
LabelerDid
The labeler this preference applies. If null the preference applies globally.
public Did? LabelerDid { get; init; }Property Value
- Did?
LabelerDid
The labeler this preference applies. If null the preference applies globally.
public Did? LabelerDid { get; init; }Property Value
- Did?
Visibility
The desired visibility for the label.
[JsonIgnore]
public LabelVisibility Visibility { get; }Property Value
Remarks
A visibility this library does not recognize is reported as idunno.Bluesky.Actor.LabelVisibility.Unknown.
Visibility
The desired visibility for the label.
[JsonIgnore]
public LabelVisibility Visibility { get; }Property Value
Remarks
A visibility this library does not recognize is reported as idunno.Bluesky.Actor.LabelVisibility.Unknown.
Visibility
The desired visibility for the label.
[JsonIgnore]
public LabelVisibility Visibility { get; }Property Value
Remarks
A visibility this library does not recognize is reported as idunno.Bluesky.Actor.LabelVisibility.Unknown.
Methods
<Clone>$()
public override ContentLabelPreference <Clone>$()Returns
<Clone>$()
public override ContentLabelPreference <Clone>$()Returns
<Clone>$()
public override ContentLabelPreference <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(Preference?)
public override sealed bool Equals(Preference? other)Parameters
otherPreference?
Returns
Equals(ContentLabelPreference?)
public bool Equals(ContentLabelPreference? other)Parameters
otherContentLabelPreference?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(Preference?)
public override sealed bool Equals(Preference? other)Parameters
otherPreference?
Returns
Equals(ContentLabelPreference?)
public bool Equals(ContentLabelPreference? other)Parameters
otherContentLabelPreference?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(Preference?)
public override sealed bool Equals(Preference? other)Parameters
otherPreference?
Returns
Equals(ContentLabelPreference?)
public bool Equals(ContentLabelPreference? other)Parameters
otherContentLabelPreference?
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()
public override string ToString()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?
Returns
operator ==(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?
Returns
operator ==(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?
Returns
operator !=(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator !=(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?
Returns
operator !=(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator !=(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?
Returns
operator !=(ContentLabelPreference?, ContentLabelPreference?)
public static bool operator !=(ContentLabelPreference? left, ContentLabelPreference? right)Parameters
leftContentLabelPreference?rightContentLabelPreference?