Class PostGate
- Namespace
- idunno.Bluesky.Feed.Gates
- Assembly
- idunno.Bluesky.dll
Record defining interaction rules for a post. The record key (rkey) of the post gate record must match the record key of the post, and that record must be in the same repository.
public sealed record PostGate : AtProtoRecord, IEquatable<AtProtoRecord>, IEquatable<PostGate>Inheritance
-
AtProtoRecord
Implements
Inherited Members
-
AtProtoRecord.Equals(AtProtoRecord?)AtProtoRecord.GetHashCode()AtProtoRecord.ToString()AtProtoRecord.Equals(object?)AtProtoRecord.<Clone>$()AtProtoRecord.ExtensionData
Constructors
PostGate(AtUri, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris = null)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
Exceptions
- ArgumentNullException
-
Thrown when
postis null. - ArgumentException
-
Thrown when
postdoes not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record. - ArgumentOutOfRangeException
-
Thrown when
rulesexceeds the maximum allowed number of post gate rules, or whendetachedEmbeddingUrisexceeds the maximum allowed number of detached embedding posts.
PostGate(AtUri, DateTimeOffset, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, DateTimeOffset createdAt, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
createdAtDateTimeOffset-
The System.DateTimeOffset the record was created on.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
PostGate(AtUri, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris = null)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
Exceptions
- ArgumentNullException
-
Thrown when
postis null. - ArgumentException
-
Thrown when
postdoes not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record. - ArgumentOutOfRangeException
-
Thrown when
rulesexceeds the maximum allowed number of post gate rules, or whendetachedEmbeddingUrisexceeds the maximum allowed number of detached embedding posts.
PostGate(AtUri, DateTimeOffset, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, DateTimeOffset createdAt, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
createdAtDateTimeOffset-
The System.DateTimeOffset the record was created on.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
PostGate(AtUri, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris = null)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
Exceptions
- ArgumentNullException
-
Thrown when
postis null. - ArgumentException
-
Thrown when
postdoes not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record. - ArgumentOutOfRangeException
-
Thrown when
rulesexceeds the maximum allowed number of post gate rules, or whendetachedEmbeddingUrisexceeds the maximum allowed number of detached embedding posts.
PostGate(AtUri, DateTimeOffset, ICollection<PostGateRule>?, ICollection<AtUri>?)
Creates a new instance of idunno.Bluesky.Feed.Gates.PostGate.
public PostGate(AtUri post, DateTimeOffset createdAt, ICollection<PostGateRule>? rules, ICollection<AtUri>? detachedEmbeddingUris)Parameters
postAtUri-
The idunno.AtProto.AtUri of the post to apply the gate rules too.
createdAtDateTimeOffset-
The System.DateTimeOffset the record was created on.
rulesICollection<PostGateRule>?-
The list of rules for post gate, if any.
detachedEmbeddingUrisICollection<AtUri>?-
The list of idunno.AtProto.AtUri posts embedding
postto be detached, if any.
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
DetachedEmbeddingUris
Gets the list of idunno.AtProto.AtUris of posts embedding the idunno.Bluesky.Feed.Gates.PostGate.Post that the author has detached, if any.
[JsonInclude]
public ICollection<AtUri>? DetachedEmbeddingUris { get; init; }Property Value
- ICollection<AtUri>?
DetachedEmbeddingUris
Gets the list of idunno.AtProto.AtUris of posts embedding the idunno.Bluesky.Feed.Gates.PostGate.Post that the author has detached, if any.
[JsonInclude]
public ICollection<AtUri>? DetachedEmbeddingUris { get; init; }Property Value
- ICollection<AtUri>?
DetachedEmbeddingUris
Gets the list of idunno.AtProto.AtUris of posts embedding the idunno.Bluesky.Feed.Gates.PostGate.Post that the author has detached, if any.
[JsonInclude]
public ICollection<AtUri>? DetachedEmbeddingUris { get; init; }Property Value
- ICollection<AtUri>?
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
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 this post gate, if any.
[JsonInclude]
[JsonPropertyName("embeddingRules")]
public ICollection<PostGateRule>? Rules { get; init; }Property Value
Rules
Gets the list of rules for this post gate, if any.
[JsonInclude]
[JsonPropertyName("embeddingRules")]
public ICollection<PostGateRule>? Rules { get; init; }Property Value
Rules
Gets the list of rules for this post gate, if any.
[JsonInclude]
[JsonPropertyName("embeddingRules")]
public ICollection<PostGateRule>? 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 PostGate <Clone>$()Returns
<Clone>$()
public override PostGate <Clone>$()Returns
<Clone>$()
public override PostGate <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(PostGate?)
public bool Equals(PostGate? other)Parameters
otherPostGate?
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(PostGate?)
public bool Equals(PostGate? other)Parameters
otherPostGate?
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(PostGate?)
public bool Equals(PostGate? other)Parameters
otherPostGate?
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.
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 ==(PostGate?, PostGate?)
public static bool operator ==(PostGate? left, PostGate? right)Parameters
Returns
operator ==(PostGate?, PostGate?)
public static bool operator ==(PostGate? left, PostGate? right)Parameters
Returns
operator ==(PostGate?, PostGate?)
public static bool operator ==(PostGate? left, PostGate? right)Parameters
Returns
operator !=(PostGate?, PostGate?)
public static bool operator !=(PostGate? left, PostGate? right)Parameters
Returns
operator !=(PostGate?, PostGate?)
public static bool operator !=(PostGate? left, PostGate? right)Parameters
Returns
operator !=(PostGate?, PostGate?)
public static bool operator !=(PostGate? left, PostGate? right)