Table of Contents

Class ConversationView

Namespace
idunno.Bluesky.Chat
Assembly
idunno.Bluesky.dll

Presents a view over a conversation.

public sealed record ConversationView : ConversationViewBase, IEquatable<View>, IEquatable<ConversationViewBase>, IEquatable<ConversationView>

Inheritance

Implements

Inherited Members

Constructors

ConversationView(string, string, IReadOnlyCollection<ProfileViewBasic>, MessageViewBase?, MessageAndReactionView?, bool, long, string?, ConversationKind?)

Creates a new instance of idunno.Bluesky.Chat.ConversationView.

[JsonConstructor]
public ConversationView(string id, string revision, IReadOnlyCollection<ProfileViewBasic> members, MessageViewBase? lastMessage, MessageAndReactionView? lastReaction, bool muted, long unreadCount, string? status, ConversationKind? kind)

Parameters

id string

The conversation identifier.

revision string

The conversation revision.

members IReadOnlyCollection<ProfileViewBasic>

The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.

lastMessage MessageViewBase?

A view over the last message in the conversation, if any.

lastReaction MessageAndReactionView?

A view of the last message and reaction to it in a conversation, if any.

muted bool

A flag indicating whether the conversation is muted.

unreadCount long

A count of the number of unread messages in the conversation.

status string?

The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

kind ConversationKind?

The kind of conversation, if any.

Exceptions

ArgumentException

Thrown when id, revision is null or whitespace.

ArgumentNullException

Thrown when members is null.

ConversationView(string, string, IReadOnlyCollection<ProfileViewBasic>, MessageViewBase?, MessageAndReactionView?, bool, long, string?, ConversationKind?)

Creates a new instance of idunno.Bluesky.Chat.ConversationView.

[JsonConstructor]
public ConversationView(string id, string revision, IReadOnlyCollection<ProfileViewBasic> members, MessageViewBase? lastMessage, MessageAndReactionView? lastReaction, bool muted, long unreadCount, string? status, ConversationKind? kind)

Parameters

id string

The conversation identifier.

revision string

The conversation revision.

members IReadOnlyCollection<ProfileViewBasic>

The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.

lastMessage MessageViewBase?

A view over the last message in the conversation, if any.

lastReaction MessageAndReactionView?

A view of the last message and reaction to it in a conversation, if any.

muted bool

A flag indicating whether the conversation is muted.

unreadCount long

A count of the number of unread messages in the conversation.

status string?

The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

kind ConversationKind?

The kind of conversation, if any.

Exceptions

ArgumentException

Thrown when id, revision is null or whitespace.

ArgumentNullException

Thrown when members is null.

ConversationView(string, string, IReadOnlyCollection<ProfileViewBasic>, MessageViewBase?, MessageAndReactionView?, bool, long, string?, ConversationKind?)

Creates a new instance of idunno.Bluesky.Chat.ConversationView.

[JsonConstructor]
public ConversationView(string id, string revision, IReadOnlyCollection<ProfileViewBasic> members, MessageViewBase? lastMessage, MessageAndReactionView? lastReaction, bool muted, long unreadCount, string? status, ConversationKind? kind)

Parameters

id string

The conversation identifier.

revision string

The conversation revision.

members IReadOnlyCollection<ProfileViewBasic>

The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.

lastMessage MessageViewBase?

A view over the last message in the conversation, if any.

lastReaction MessageAndReactionView?

A view of the last message and reaction to it in a conversation, if any.

muted bool

A flag indicating whether the conversation is muted.

unreadCount long

A count of the number of unread messages in the conversation.

status string?

The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

kind ConversationKind?

The kind of conversation, if any.

Exceptions

ArgumentException

Thrown when id, revision is null or whitespace.

ArgumentNullException

Thrown when members is null.

Properties

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

Id

Gets the conversation identifier.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Id

Gets the conversation identifier.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Id

Gets the conversation identifier.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Kind

Gets the kind of conversation, if any.

public ConversationKind? Kind { get; init; }

Property Value

ConversationKind?

Kind

Gets the kind of conversation, if any.

public ConversationKind? Kind { get; init; }

Property Value

ConversationKind?

Kind

Gets the kind of conversation, if any.

public ConversationKind? Kind { get; init; }

Property Value

ConversationKind?

LastMessage

Gets a view over the last message in the conversation, if any.

[JsonInclude]
public MessageViewBase? LastMessage { get; init; }

Property Value

MessageViewBase?

LastMessage

Gets a view over the last message in the conversation, if any.

[JsonInclude]
public MessageViewBase? LastMessage { get; init; }

Property Value

MessageViewBase?

LastMessage

Gets a view over the last message in the conversation, if any.

[JsonInclude]
public MessageViewBase? LastMessage { get; init; }

Property Value

MessageViewBase?

LastReaction

Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.

[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }

Property Value

MessageAndReactionView?

LastReaction

Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.

[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }

Property Value

MessageAndReactionView?

LastReaction

Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.

[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }

Property Value

MessageAndReactionView?

Members

Gets the idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation. For group convos, it will be a collection of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use idunno.Bluesky.BlueskyAgent.GetConversationMembers(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken) to list all members.

[JsonInclude]
[JsonRequired]
public IReadOnlyCollection<ProfileViewBasic> Members { get; init; }

Property Value

IReadOnlyCollection<ProfileViewBasic>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here.

Exceptions

ArgumentNullException

Thrown when the value set is null.

Members

Gets the idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation. For group convos, it will be a collection of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use idunno.Bluesky.BlueskyAgent.GetConversationMembers(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken) to list all members.

[JsonInclude]
[JsonRequired]
public IReadOnlyCollection<ProfileViewBasic> Members { get; init; }

Property Value

IReadOnlyCollection<ProfileViewBasic>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here.

Exceptions

ArgumentNullException

Thrown when the value set is null.

Members

Gets the idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation. For group convos, it will be a collection of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use idunno.Bluesky.BlueskyAgent.GetConversationMembers(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken) to list all members.

[JsonInclude]
[JsonRequired]
public IReadOnlyCollection<ProfileViewBasic> Members { get; init; }

Property Value

IReadOnlyCollection<ProfileViewBasic>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here.

Exceptions

ArgumentNullException

Thrown when the value set is null.

Muted

Gets a flag indicating whether the conversation is muted.

[JsonInclude]
[JsonRequired]
public bool Muted { get; init; }

Property Value

bool

Muted

Gets a flag indicating whether the conversation is muted.

[JsonInclude]
[JsonRequired]
public bool Muted { get; init; }

Property Value

bool

Muted

Gets a flag indicating whether the conversation is muted.

[JsonInclude]
[JsonRequired]
public bool Muted { get; init; }

Property Value

bool

Revision

Gets the conversation revision.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Revision

Gets the conversation revision.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Revision

Gets the conversation revision.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Status

Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

[JsonInclude]
public string? Status { get; init; }

Property Value

string?

Status

Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

[JsonInclude]
public string? Status { get; init; }

Property Value

string?

Status

Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.

[JsonInclude]
public string? Status { get; init; }

Property Value

string?

UnreadCount

Gets a count of the number of unread messages in the conversation.

[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }

Property Value

long

UnreadCount

Gets a count of the number of unread messages in the conversation.

[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }

Property Value

long

UnreadCount

Gets a count of the number of unread messages in the conversation.

[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }

Property Value

long

Methods

<Clone>$()

public override ConversationView <Clone>$()

Returns

ConversationView

<Clone>$()

public override ConversationView <Clone>$()

Returns

ConversationView

<Clone>$()

public override ConversationView <Clone>$()

Returns

ConversationView

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ConversationViewBase?)

public override sealed bool Equals(ConversationViewBase? other)

Parameters

other ConversationViewBase?

Returns

bool

Equals(ConversationView?)

public bool Equals(ConversationView? other)

Parameters

other ConversationView?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ConversationViewBase?)

public override sealed bool Equals(ConversationViewBase? other)

Parameters

other ConversationViewBase?

Returns

bool

Equals(ConversationView?)

public bool Equals(ConversationView? other)

Parameters

other ConversationView?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(ConversationViewBase?)

public override sealed bool Equals(ConversationViewBase? other)

Parameters

other ConversationViewBase?

Returns

bool

Equals(ConversationView?)

public bool Equals(ConversationView? other)

Parameters

other ConversationView?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

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

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool

operator ==(ConversationView?, ConversationView?)

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool

operator ==(ConversationView?, ConversationView?)

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool

operator !=(ConversationView?, ConversationView?)

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool

operator !=(ConversationView?, ConversationView?)

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool

operator !=(ConversationView?, ConversationView?)

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

Parameters

left ConversationView?
right ConversationView?

Returns

bool