Table of Contents

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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to be detached, if any.

Exceptions

ArgumentNullException

Thrown when post is null.

ArgumentException

Thrown when post does not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record.

ArgumentOutOfRangeException

Thrown when rules exceeds the maximum allowed number of post gate rules, or when detachedEmbeddingUris exceeds 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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

createdAt DateTimeOffset

The System.DateTimeOffset the record was created on.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to 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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to be detached, if any.

Exceptions

ArgumentNullException

Thrown when post is null.

ArgumentException

Thrown when post does not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record.

ArgumentOutOfRangeException

Thrown when rules exceeds the maximum allowed number of post gate rules, or when detachedEmbeddingUris exceeds 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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

createdAt DateTimeOffset

The System.DateTimeOffset the record was created on.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to 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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to be detached, if any.

Exceptions

ArgumentNullException

Thrown when post is null.

ArgumentException

Thrown when post does not point to a idunno.Bluesky.Feed.Gates.PostGate.Post record.

ArgumentOutOfRangeException

Thrown when rules exceeds the maximum allowed number of post gate rules, or when detachedEmbeddingUris exceeds 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

post AtUri

The idunno.AtProto.AtUri of the post to apply the gate rules too.

createdAt DateTimeOffset

The System.DateTimeOffset the record was created on.

rules ICollection<PostGateRule>?

The list of rules for post gate, if any.

detachedEmbeddingUris ICollection<AtUri>?

The list of idunno.AtProto.AtUri posts embedding post to be detached, if any.

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

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

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

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

ICollection<PostGateRule>?

Rules

Gets the list of rules for this post gate, if any.

[JsonInclude]
[JsonPropertyName("embeddingRules")]
public ICollection<PostGateRule>? Rules { get; init; }

Property Value

ICollection<PostGateRule>?

Rules

Gets the list of rules for this post gate, if any.

[JsonInclude]
[JsonPropertyName("embeddingRules")]
public ICollection<PostGateRule>? Rules { get; init; }

Property Value

ICollection<PostGateRule>?

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 PostGate <Clone>$()

Returns

PostGate

<Clone>$()

public override PostGate <Clone>$()

Returns

PostGate

<Clone>$()

public override PostGate <Clone>$()

Returns

PostGate

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(PostGate?)

public bool Equals(PostGate? other)

Parameters

other PostGate?

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(PostGate?)

public bool Equals(PostGate? other)

Parameters

other PostGate?

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(PostGate?)

public bool Equals(PostGate? other)

Parameters

other PostGate?

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.

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

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

Parameters

left PostGate?
right PostGate?

Returns

bool

operator ==(PostGate?, PostGate?)

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

Parameters

left PostGate?
right PostGate?

Returns

bool

operator ==(PostGate?, PostGate?)

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

Parameters

left PostGate?
right PostGate?

Returns

bool

operator !=(PostGate?, PostGate?)

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

Parameters

left PostGate?
right PostGate?

Returns

bool

operator !=(PostGate?, PostGate?)

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

Parameters

left PostGate?
right PostGate?

Returns

bool

operator !=(PostGate?, PostGate?)

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

Parameters

left PostGate?
right PostGate?

Returns

bool