Table of Contents

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

label string

The label name.

labelerDid Did?

The idunno.AtProto.Did of the labeler. If null this preference applies globally.

visibility LabelVisibility

How the label should be treated in a UI.

Exceptions

ArgumentException

Thrown if label is null or white space.

ArgumentOutOfRangeException

Thrown if visibility is 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

label string

The label name.

labelerDid Did?

The idunno.AtProto.Did of the labeler. If null this preference applies globally.

visibility LabelVisibility

How the label should be treated in a UI.

Exceptions

ArgumentException

Thrown if label is null or white space.

ArgumentOutOfRangeException

Thrown if visibility is 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

label string

The label name.

labelerDid Did?

The idunno.AtProto.Did of the labeler. If null this preference applies globally.

visibility LabelVisibility

How the label should be treated in a UI.

Exceptions

ArgumentException

Thrown if label is null or white space.

ArgumentOutOfRangeException

Thrown if visibility is idunno.Bluesky.Actor.LabelVisibility.Unknown.

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Label

The label the preference applies to.

[JsonRequired]
public string Label { get; init; }

Property Value

string

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

string

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

string

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

LabelVisibility

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

LabelVisibility

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

LabelVisibility

Remarks

A visibility this library does not recognize is reported as idunno.Bluesky.Actor.LabelVisibility.Unknown.

Methods

<Clone>$()

public override ContentLabelPreference <Clone>$()

Returns

ContentLabelPreference

<Clone>$()

public override ContentLabelPreference <Clone>$()

Returns

ContentLabelPreference

<Clone>$()

public override ContentLabelPreference <Clone>$()

Returns

ContentLabelPreference

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(Preference?)

public override sealed bool Equals(Preference? other)

Parameters

other Preference?

Returns

bool

Equals(ContentLabelPreference?)

public bool Equals(ContentLabelPreference? other)

Parameters

other ContentLabelPreference?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(Preference?)

public override sealed bool Equals(Preference? other)

Parameters

other Preference?

Returns

bool

Equals(ContentLabelPreference?)

public bool Equals(ContentLabelPreference? other)

Parameters

other ContentLabelPreference?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(Preference?)

public override sealed bool Equals(Preference? other)

Parameters

other Preference?

Returns

bool

Equals(ContentLabelPreference?)

public bool Equals(ContentLabelPreference? other)

Parameters

other ContentLabelPreference?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ContentLabelPreference?, ContentLabelPreference?)

public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool

operator ==(ContentLabelPreference?, ContentLabelPreference?)

public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool

operator ==(ContentLabelPreference?, ContentLabelPreference?)

public static bool operator ==(ContentLabelPreference? left, ContentLabelPreference? right)

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool

operator !=(ContentLabelPreference?, ContentLabelPreference?)

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

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool

operator !=(ContentLabelPreference?, ContentLabelPreference?)

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

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool

operator !=(ContentLabelPreference?, ContentLabelPreference?)

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

Parameters

left ContentLabelPreference?
right ContentLabelPreference?

Returns

bool