Class Block
- Namespace
- idunno.Bluesky.Graph
- Assembly
- idunno.Bluesky.dll
Encapsulates the information needed to create a block record.
[JsonPolymorphic(IgnoreUnrecognizedTypeDiscriminators = true, UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
[JsonDerivedType(typeof(Block), "app.bsky.graph.block")]
public record Block : BlueskyTimestampedRecord, IEquatable<AtProtoRecord>, IEquatable<BlueskyRecord>, IEquatable<BlueskyTimestampedRecord>, IEquatable<Block>Inheritance
-
AtProtoRecord
Implements
Inherited Members
-
AtProtoRecord.Equals(AtProtoRecord?)AtProtoRecord.GetHashCode()AtProtoRecord.ToString()AtProtoRecord.PrintMembers(StringBuilder)AtProtoRecord.Equals(object?)AtProtoRecord.<Clone>$()AtProtoRecord.EqualityContractAtProtoRecord.ExtensionData
Constructors
Block(Did)
Creates a new instance of idunno.Bluesky.Graph.Block with idunno.Bluesky.Record.BlueskyTimestampedRecord.CreatedAt set to the current date and time.
public Block(Did subject)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
Block(Did, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Graph.Block.
[JsonConstructor]
public Block(Did subject, DateTimeOffset createdAt)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
createdAtDateTimeOffset-
The System.DateTimeOffset for the repost creation date.
Exceptions
- ArgumentNullException
-
Thrown when
subjectis null.
Block(Block)
protected Block(Block original)Parameters
originalBlock
Block(Did)
Creates a new instance of idunno.Bluesky.Graph.Block with idunno.Bluesky.Record.BlueskyTimestampedRecord.CreatedAt set to the current date and time.
public Block(Did subject)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
Block(Did, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Graph.Block.
[JsonConstructor]
public Block(Did subject, DateTimeOffset createdAt)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
createdAtDateTimeOffset-
The System.DateTimeOffset for the repost creation date.
Exceptions
- ArgumentNullException
-
Thrown when
subjectis null.
Block(Block)
protected Block(Block original)Parameters
originalBlock
Block(Did)
Creates a new instance of idunno.Bluesky.Graph.Block with idunno.Bluesky.Record.BlueskyTimestampedRecord.CreatedAt set to the current date and time.
public Block(Did subject)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
Block(Did, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Graph.Block.
[JsonConstructor]
public Block(Did subject, DateTimeOffset createdAt)Parameters
subjectDid-
The idunno.AtProto.Did to the actor to be blocked.
createdAtDateTimeOffset-
The System.DateTimeOffset for the repost creation date.
Exceptions
- ArgumentNullException
-
Thrown when
subjectis null.
Block(Block)
protected Block(Block original)Parameters
originalBlock
Properties
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Subject
Gets the idunno.AtProto.Did of the subject to be blocked.
[JsonInclude]
[JsonRequired]
public Did Subject { get; init; }Property Value
- Did
Subject
Gets the idunno.AtProto.Did of the subject to be blocked.
[JsonInclude]
[JsonRequired]
public Did Subject { get; init; }Property Value
- Did
Subject
Gets the idunno.AtProto.Did of the subject to be blocked.
[JsonInclude]
[JsonRequired]
public Did Subject { get; init; }Property Value
- Did
Methods
<Clone>$()
public override Block <Clone>$()Returns
<Clone>$()
public override Block <Clone>$()Returns
<Clone>$()
public override Block <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(BlueskyTimestampedRecord?)
public override sealed bool Equals(BlueskyTimestampedRecord? other)Parameters
otherBlueskyTimestampedRecord?
Returns
Equals(Block?)
public virtual bool Equals(Block? other)Parameters
otherBlock?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(BlueskyTimestampedRecord?)
public override sealed bool Equals(BlueskyTimestampedRecord? other)Parameters
otherBlueskyTimestampedRecord?
Returns
Equals(Block?)
public virtual bool Equals(Block? other)Parameters
otherBlock?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(BlueskyTimestampedRecord?)
public override sealed bool Equals(BlueskyTimestampedRecord? other)Parameters
otherBlueskyTimestampedRecord?
Returns
Equals(Block?)
public virtual bool Equals(Block? other)Parameters
otherBlock?
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 ==(Block?, Block?)
public static bool operator ==(Block? left, Block? right)Parameters
Returns
operator ==(Block?, Block?)
public static bool operator ==(Block? left, Block? right)Parameters
Returns
operator ==(Block?, Block?)
public static bool operator ==(Block? left, Block? right)Parameters
Returns
operator !=(Block?, Block?)
public static bool operator !=(Block? left, Block? right)Parameters
Returns
operator !=(Block?, Block?)
public static bool operator !=(Block? left, Block? right)Parameters
Returns
operator !=(Block?, Block?)
public static bool operator !=(Block? left, Block? right)