Table of Contents

Class ThreadGate

Namespace
idunno.Bluesky.Feed.Gates
Assembly
idunno.Bluesky.dll

Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository

public sealed record ThreadGate : AtProtoRecord, IEquatable<AtProtoRecord>, IEquatable<ThreadGate>

Inheritance

AtProtoRecord

Implements

Inherited Members

AtProtoRecord.Equals(AtProtoRecord?)
AtProtoRecord.GetHashCode()
AtProtoRecord.ToString()
AtProtoRecord.Equals(object?)
AtProtoRecord.<Clone>$()
AtProtoRecord.ExtensionData

Constructors

ThreadGate(AtUri, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

public ThreadGate(AtUri post, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenRepliesUris = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenRepliesUris ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

Exceptions

ArgumentNullException

if post is null.

ArgumentOutOfRangeException

Thrown when rules or hiddenRepliesUris have more than the maximum number of entries.

ArgumentException

if post does not point to a idunno.Bluesky.Feed.Gates.ThreadGate.Post record.

ThreadGate(AtUri, DateTimeOffset, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

[JsonConstructor]
public ThreadGate(AtUri post, DateTimeOffset createdAt, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenReplies = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

createdAt DateTimeOffset

The System.DateTimeOffset when this record was created

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenReplies ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

ThreadGate(AtUri, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

public ThreadGate(AtUri post, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenRepliesUris = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenRepliesUris ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

Exceptions

ArgumentNullException

if post is null.

ArgumentOutOfRangeException

Thrown when rules or hiddenRepliesUris have more than the maximum number of entries.

ArgumentException

if post does not point to a idunno.Bluesky.Feed.Gates.ThreadGate.Post record.

ThreadGate(AtUri, DateTimeOffset, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

[JsonConstructor]
public ThreadGate(AtUri post, DateTimeOffset createdAt, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenReplies = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

createdAt DateTimeOffset

The System.DateTimeOffset when this record was created

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenReplies ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

ThreadGate(AtUri, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

public ThreadGate(AtUri post, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenRepliesUris = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenRepliesUris ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

Exceptions

ArgumentNullException

if post is null.

ArgumentOutOfRangeException

Thrown when rules or hiddenRepliesUris have more than the maximum number of entries.

ArgumentException

if post does not point to a idunno.Bluesky.Feed.Gates.ThreadGate.Post record.

ThreadGate(AtUri, DateTimeOffset, ICollection<ThreadGateRule>?, ICollection<AtUri>?)

Creates a new instance of idunno.Bluesky.Feed.Gates.ThreadGate.

[JsonConstructor]
public ThreadGate(AtUri post, DateTimeOffset createdAt, ICollection<ThreadGateRule>? rules = null, ICollection<AtUri>? hiddenReplies = null)

Parameters

post AtUri

The idunno.AtProto.AtUri of the thread to be gated.

createdAt DateTimeOffset

The System.DateTimeOffset when this record was created

rules ICollection<ThreadGateRule>?

The list of rules for replies to the specified post.

hiddenReplies ICollection<AtUri>?

A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post

Properties

CreatedAt

Gets the System.DateTimeOffset when this record was created.

[JsonInclude]
[JsonRequired]
public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

CreatedAt

Gets the System.DateTimeOffset when this record was created.

[JsonInclude]
[JsonRequired]
public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

CreatedAt

Gets the System.DateTimeOffset when this record was created.

[JsonInclude]
[JsonRequired]
public DateTimeOffset CreatedAt { get; init; }

Property Value

DateTimeOffset

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

HiddenReplies

Gets a list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ICollection<AtUri>? HiddenReplies { get; init; }

Property Value

ICollection<AtUri>?

HiddenReplies

Gets a list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ICollection<AtUri>? HiddenReplies { get; init; }

Property Value

ICollection<AtUri>?

HiddenReplies

Gets a list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ICollection<AtUri>? HiddenReplies { get; init; }

Property Value

ICollection<AtUri>?

Post

Gets the idunno.AtProto.AtUri reference to the post to be gated.

[JsonInclude]
[JsonRequired]
public AtUri Post { get; init; }

Property Value

AtUri

Post

Gets the idunno.AtProto.AtUri reference to the post to be gated.

[JsonInclude]
[JsonRequired]
public AtUri Post { get; init; }

Property Value

AtUri

Post

Gets the idunno.AtProto.AtUri reference to the post to be gated.

[JsonInclude]
[JsonRequired]
public AtUri Post { get; init; }

Property Value

AtUri

Rules

Gets the list of rules for replies for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("allow")]
public ICollection<ThreadGateRule>? Rules { get; init; }

Property Value

ICollection<ThreadGateRule>?

Rules

Gets the list of rules for replies for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("allow")]
public ICollection<ThreadGateRule>? Rules { get; init; }

Property Value

ICollection<ThreadGateRule>?

Rules

Gets the list of rules for replies for idunno.Bluesky.Feed.Gates.ThreadGate.Post.

[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("allow")]
public ICollection<ThreadGateRule>? Rules { get; init; }

Property Value

ICollection<ThreadGateRule>?

Type

The JavaScript object type for the record.

[JsonInclude]
public string Type { get; }

Property Value

string

Type

The JavaScript object type for the record.

[JsonInclude]
public string Type { get; }

Property Value

string

Type

The JavaScript object type for the record.

[JsonInclude]
public string Type { get; }

Property Value

string

Methods

<Clone>$()

public override ThreadGate <Clone>$()

Returns

ThreadGate

<Clone>$()

public override ThreadGate <Clone>$()

Returns

ThreadGate

<Clone>$()

public override ThreadGate <Clone>$()

Returns

ThreadGate

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AtProtoRecord?)

Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.

public override sealed bool Equals(AtProtoRecord? other)

Parameters

other AtProtoRecord?

The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.

Equals(ThreadGate?)

public bool Equals(ThreadGate? other)

Parameters

other ThreadGate?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AtProtoRecord?)

Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.

public override sealed bool Equals(AtProtoRecord? other)

Parameters

other AtProtoRecord?

The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.

Equals(ThreadGate?)

public bool Equals(ThreadGate? other)

Parameters

other ThreadGate?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AtProtoRecord?)

Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.

public override sealed bool Equals(AtProtoRecord? other)

Parameters

other AtProtoRecord?

The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.

Equals(ThreadGate?)

public bool Equals(ThreadGate? other)

Parameters

other ThreadGate?

Returns

bool

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the keys of idunno.AtProto.Repo.AtProtoRecord.ExtensionData rather than from its identity.

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the keys of idunno.AtProto.Repo.AtProtoRecord.ExtensionData rather than from its identity.

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the keys of idunno.AtProto.Repo.AtProtoRecord.ExtensionData rather than from its identity.

NoReplies(AtUri)

Gets a configured instance of idunno.Bluesky.Feed.Gates.ThreadGate for the specified post which doesn't allow any replies.

public static ThreadGate NoReplies(AtUri post)

Parameters

post AtUri

The idunno.AtProto.AtUri of the post to gate.

Returns

ThreadGate

A configured instance of idunno.Bluesky.Feed.Gates.ThreadGate which doesn't allow any replies.

Exceptions

ArgumentNullException

if idunno.Bluesky.Feed.Gates.ThreadGate.Post is null.

NoReplies(AtUri)

Gets a configured instance of idunno.Bluesky.Feed.Gates.ThreadGate for the specified post which doesn't allow any replies.

public static ThreadGate NoReplies(AtUri post)

Parameters

post AtUri

The idunno.AtProto.AtUri of the post to gate.

Returns

ThreadGate

A configured instance of idunno.Bluesky.Feed.Gates.ThreadGate which doesn't allow any replies.

Exceptions

ArgumentNullException

if idunno.Bluesky.Feed.Gates.ThreadGate.Post is null.

NoReplies(AtUri)

Gets a configured instance of idunno.Bluesky.Feed.Gates.ThreadGate for the specified post which doesn't allow any replies.

public static ThreadGate NoReplies(AtUri post)

Parameters

post AtUri

The idunno.AtProto.AtUri of the post to gate.

Returns

ThreadGate

A configured instance of idunno.Bluesky.Feed.Gates.ThreadGate which doesn't allow any replies.

Exceptions

ArgumentNullException

if idunno.Bluesky.Feed.Gates.ThreadGate.Post is null.

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 ==(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool

operator ==(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool

operator ==(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool

operator !=(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool

operator !=(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool

operator !=(ThreadGate?, ThreadGate?)

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

Parameters

left ThreadGate?
right ThreadGate?

Returns

bool