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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesUrisICollection<AtUri>?-
A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post
Exceptions
- ArgumentNullException
-
if
postis null. - ArgumentOutOfRangeException
-
Thrown when
rulesorhiddenRepliesUrishave more than the maximum number of entries. - ArgumentException
-
if
postdoes 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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
createdAtDateTimeOffset-
The System.DateTimeOffset when this record was created
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesICollection<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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesUrisICollection<AtUri>?-
A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post
Exceptions
- ArgumentNullException
-
if
postis null. - ArgumentOutOfRangeException
-
Thrown when
rulesorhiddenRepliesUrishave more than the maximum number of entries. - ArgumentException
-
if
postdoes 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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
createdAtDateTimeOffset-
The System.DateTimeOffset when this record was created
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesICollection<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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesUrisICollection<AtUri>?-
A list of reply idunno.AtProto.AtUris that will be hidden for idunno.Bluesky.Feed.Gates.ThreadGate.Post
Exceptions
- ArgumentNullException
-
if
postis null. - ArgumentOutOfRangeException
-
Thrown when
rulesorhiddenRepliesUrishave more than the maximum number of entries. - ArgumentException
-
if
postdoes 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
postAtUri-
The idunno.AtProto.AtUri of the thread to be gated.
createdAtDateTimeOffset-
The System.DateTimeOffset when this record was created
rulesICollection<ThreadGateRule>?-
The list of rules for replies to the specified
post. hiddenRepliesICollection<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
CreatedAt
Gets the System.DateTimeOffset when this record was created.
[JsonInclude]
[JsonRequired]
public DateTimeOffset CreatedAt { get; init; }Property Value
CreatedAt
Gets the System.DateTimeOffset when this record was created.
[JsonInclude]
[JsonRequired]
public DateTimeOffset CreatedAt { get; init; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
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
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
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
Type
The JavaScript object type for the record.
[JsonInclude]
public string Type { get; }Property Value
Type
The JavaScript object type for the record.
[JsonInclude]
public string Type { get; }Property Value
Type
The JavaScript object type for the record.
[JsonInclude]
public string Type { get; }Property Value
Methods
<Clone>$()
public override ThreadGate <Clone>$()Returns
<Clone>$()
public override ThreadGate <Clone>$()Returns
<Clone>$()
public override ThreadGate <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AtProtoRecord?)
Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.
public override sealed bool Equals(AtProtoRecord? other)Parameters
otherAtProtoRecord?-
The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.
Returns
Remarks
idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.
Equals(ThreadGate?)
public bool Equals(ThreadGate? other)Parameters
otherThreadGate?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AtProtoRecord?)
Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.
public override sealed bool Equals(AtProtoRecord? other)Parameters
otherAtProtoRecord?-
The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.
Returns
Remarks
idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.
Equals(ThreadGate?)
public bool Equals(ThreadGate? other)Parameters
otherThreadGate?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AtProtoRecord?)
Determines whether the specified idunno.AtProto.Repo.AtProtoRecord is equal to the current instance.
public override sealed bool Equals(AtProtoRecord? other)Parameters
otherAtProtoRecord?-
The idunno.AtProto.Repo.AtProtoRecord to compare against the current instance.
Returns
Remarks
idunno.AtProto.Repo.AtProtoRecord.ExtensionData is compared by its contents rather than by reference.
Equals(ThreadGate?)
public bool Equals(ThreadGate? other)Parameters
otherThreadGate?
Returns
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
postAtUri-
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
postAtUri-
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
postAtUri-
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
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 ==(ThreadGate?, ThreadGate?)
public static bool operator ==(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?
Returns
operator ==(ThreadGate?, ThreadGate?)
public static bool operator ==(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?
Returns
operator ==(ThreadGate?, ThreadGate?)
public static bool operator ==(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?
Returns
operator !=(ThreadGate?, ThreadGate?)
public static bool operator !=(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?
Returns
operator !=(ThreadGate?, ThreadGate?)
public static bool operator !=(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?
Returns
operator !=(ThreadGate?, ThreadGate?)
public static bool operator !=(ThreadGate? left, ThreadGate? right)Parameters
leftThreadGate?rightThreadGate?