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
idstring-
The conversation identifier.
revisionstring-
The conversation revision.
membersIReadOnlyCollection<ProfileViewBasic>-
The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.
lastMessageMessageViewBase?-
A view over the last message in the conversation, if any.
lastReactionMessageAndReactionView?-
A view of the last message and reaction to it in a conversation, if any.
mutedbool-
A flag indicating whether the conversation is muted.
unreadCountlong-
A count of the number of unread messages in the conversation.
statusstring?-
The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
kindConversationKind?-
The kind of conversation, if any.
Exceptions
- ArgumentException
-
Thrown when
id,revisionis null or whitespace. - ArgumentNullException
-
Thrown when
membersis 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
idstring-
The conversation identifier.
revisionstring-
The conversation revision.
membersIReadOnlyCollection<ProfileViewBasic>-
The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.
lastMessageMessageViewBase?-
A view over the last message in the conversation, if any.
lastReactionMessageAndReactionView?-
A view of the last message and reaction to it in a conversation, if any.
mutedbool-
A flag indicating whether the conversation is muted.
unreadCountlong-
A count of the number of unread messages in the conversation.
statusstring?-
The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
kindConversationKind?-
The kind of conversation, if any.
Exceptions
- ArgumentException
-
Thrown when
id,revisionis null or whitespace. - ArgumentNullException
-
Thrown when
membersis 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
idstring-
The conversation identifier.
revisionstring-
The conversation revision.
membersIReadOnlyCollection<ProfileViewBasic>-
The idunno.Bluesky.Actor.ProfileViewBasic of the members of the conversation.
lastMessageMessageViewBase?-
A view over the last message in the conversation, if any.
lastReactionMessageAndReactionView?-
A view of the last message and reaction to it in a conversation, if any.
mutedbool-
A flag indicating whether the conversation is muted.
unreadCountlong-
A count of the number of unread messages in the conversation.
statusstring?-
The status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
kindConversationKind?-
The kind of conversation, if any.
Exceptions
- ArgumentException
-
Thrown when
id,revisionis null or whitespace. - ArgumentNullException
-
Thrown when
membersis null.
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
Id
Gets the conversation identifier.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Id
Gets the conversation identifier.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Id
Gets the conversation identifier.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Kind
Gets the kind of conversation, if any.
public ConversationKind? Kind { get; init; }Property Value
Kind
Gets the kind of conversation, if any.
public ConversationKind? Kind { get; init; }Property Value
Kind
Gets the kind of conversation, if any.
public ConversationKind? Kind { get; init; }Property Value
LastMessage
Gets a view over the last message in the conversation, if any.
[JsonInclude]
public MessageViewBase? LastMessage { get; init; }Property Value
LastMessage
Gets a view over the last message in the conversation, if any.
[JsonInclude]
public MessageViewBase? LastMessage { get; init; }Property Value
LastMessage
Gets a view over the last message in the conversation, if any.
[JsonInclude]
public MessageViewBase? LastMessage { get; init; }Property Value
LastReaction
Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.
[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }Property Value
LastReaction
Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.
[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }Property Value
LastReaction
Gets a idunno.Bluesky.Chat.MessageAndReactionView of the last reaction to a conversation, if any.
[JsonInclude]
public MessageAndReactionView? LastReaction { get; init; }Property Value
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
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
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
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
Muted
Gets a flag indicating whether the conversation is muted.
[JsonInclude]
[JsonRequired]
public bool Muted { get; init; }Property Value
Muted
Gets a flag indicating whether the conversation is muted.
[JsonInclude]
[JsonRequired]
public bool Muted { get; init; }Property Value
Revision
Gets the conversation revision.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Revision
Gets the conversation revision.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Revision
Gets the conversation revision.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Status
Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
[JsonInclude]
public string? Status { get; init; }Property Value
Status
Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
[JsonInclude]
public string? Status { get; init; }Property Value
Status
Gets the status of the conversation. Known values are defined in idunno.Bluesky.Chat.ConversationStatus.
[JsonInclude]
public string? Status { get; init; }Property Value
UnreadCount
Gets a count of the number of unread messages in the conversation.
[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }Property Value
UnreadCount
Gets a count of the number of unread messages in the conversation.
[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }Property Value
UnreadCount
Gets a count of the number of unread messages in the conversation.
[JsonInclude]
[JsonRequired]
public long UnreadCount { get; init; }Property Value
Methods
<Clone>$()
public override ConversationView <Clone>$()Returns
<Clone>$()
public override ConversationView <Clone>$()Returns
<Clone>$()
public override ConversationView <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ConversationViewBase?)
public override sealed bool Equals(ConversationViewBase? other)Parameters
otherConversationViewBase?
Returns
Equals(ConversationView?)
public bool Equals(ConversationView? other)Parameters
otherConversationView?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ConversationViewBase?)
public override sealed bool Equals(ConversationViewBase? other)Parameters
otherConversationViewBase?
Returns
Equals(ConversationView?)
public bool Equals(ConversationView? other)Parameters
otherConversationView?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(ConversationViewBase?)
public override sealed bool Equals(ConversationViewBase? other)Parameters
otherConversationViewBase?
Returns
Equals(ConversationView?)
public bool Equals(ConversationView? other)Parameters
otherConversationView?
Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
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 ==(ConversationView?, ConversationView?)
public static bool operator ==(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?
Returns
operator ==(ConversationView?, ConversationView?)
public static bool operator ==(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?
Returns
operator ==(ConversationView?, ConversationView?)
public static bool operator ==(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?
Returns
operator !=(ConversationView?, ConversationView?)
public static bool operator !=(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?
Returns
operator !=(ConversationView?, ConversationView?)
public static bool operator !=(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?
Returns
operator !=(ConversationView?, ConversationView?)
public static bool operator !=(ConversationView? left, ConversationView? right)Parameters
leftConversationView?rightConversationView?