Class MessageView
- Namespace
- idunno.Bluesky.Chat
- Assembly
- idunno.Bluesky.dll
Presents a view over a message.
public sealed record MessageView : MessageViewBase, IEquatable<View>, IEquatable<MessageViewBase>, IEquatable<MessageView>Inheritance
Implements
Inherited Members
Constructors
MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Chat.MessageView.
public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)Parameters
idstring-
The message ID.
revisionstring-
The message revision.
textstring-
The text of the message.
facetsIReadOnlyCollection<Facet>?-
Facets to apply to the message
text, if any. embedEmbeddedRecordView?-
A view over the embedded record in the message, if any.
reactionsIReadOnlyCollection<ReactionView>?-
Reactions to the message
text, if any. senderMessageViewSender-
A view over the message author.
sentAtDateTimeOffset-
The System.DateTimeOffset the message was sent on.
Exceptions
- ArgumentException
-
Thrown when either
idorrevisionis null or whitespace. - ArgumentNullException
-
Thrown when
textorsenderis null.
MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Chat.MessageView.
public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)Parameters
idstring-
The message ID.
revisionstring-
The message revision.
textstring-
The text of the message.
facetsIReadOnlyCollection<Facet>?-
Facets to apply to the message
text, if any. embedEmbeddedRecordView?-
A view over the embedded record in the message, if any.
reactionsIReadOnlyCollection<ReactionView>?-
Reactions to the message
text, if any. senderMessageViewSender-
A view over the message author.
sentAtDateTimeOffset-
The System.DateTimeOffset the message was sent on.
Exceptions
- ArgumentException
-
Thrown when either
idorrevisionis null or whitespace. - ArgumentNullException
-
Thrown when
textorsenderis null.
MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)
Creates a new instance of idunno.Bluesky.Chat.MessageView.
public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)Parameters
idstring-
The message ID.
revisionstring-
The message revision.
textstring-
The text of the message.
facetsIReadOnlyCollection<Facet>?-
Facets to apply to the message
text, if any. embedEmbeddedRecordView?-
A view over the embedded record in the message, if any.
reactionsIReadOnlyCollection<ReactionView>?-
Reactions to the message
text, if any. senderMessageViewSender-
A view over the message author.
sentAtDateTimeOffset-
The System.DateTimeOffset the message was sent on.
Exceptions
- ArgumentException
-
Thrown when either
idorrevisionis null or whitespace. - ArgumentNullException
-
Thrown when
textorsenderis null.
Properties
Embed
Gets a view over the embedded record, if any.
[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }Property Value
Embed
Gets a view over the embedded record, if any.
[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }Property Value
Embed
Gets a view over the embedded record, if any.
[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Facets
Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.
[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Facets
Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.
[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Facets
Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.
[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Id
Gets the id of a message.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Id
Gets the id of a message.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Id
Gets the id of a message.
[JsonInclude]
[JsonRequired]
public string Id { get; init; }Property Value
Reactions
Gets reactions to the message, in ascending order of creation time.
[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Reactions
Gets reactions to the message, in ascending order of creation time.
[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Reactions
Gets reactions to the message, in ascending order of creation time.
[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }Property Value
Remarks
The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.
Revision
Gets the revision of a message.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Revision
Gets the revision of a message.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Revision
Gets the revision of a message.
[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }Property Value
Sender
Gets a view over the message author.
[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }Property Value
Sender
Gets a view over the message author.
[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }Property Value
Sender
Gets a view over the message author.
[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }Property Value
SentAt
Gets the System.DateTimeOffset the message was sent on.
[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }Property Value
SentAt
Gets the System.DateTimeOffset the message was sent on.
[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }Property Value
SentAt
Gets the System.DateTimeOffset the message was sent on.
[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }Property Value
Text
Gets the text of a message.
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Text
Gets the text of a message.
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Text
Gets the text of a message.
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Methods
<Clone>$()
public override MessageView <Clone>$()Returns
<Clone>$()
public override MessageView <Clone>$()Returns
<Clone>$()
public override MessageView <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageViewBase?)
public override sealed bool Equals(MessageViewBase? other)Parameters
otherMessageViewBase?
Returns
Equals(MessageView?)
public bool Equals(MessageView? other)Parameters
otherMessageView?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageViewBase?)
public override sealed bool Equals(MessageViewBase? other)Parameters
otherMessageViewBase?
Returns
Equals(MessageView?)
public bool Equals(MessageView? other)Parameters
otherMessageView?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageViewBase?)
public override sealed bool Equals(MessageViewBase? other)Parameters
otherMessageViewBase?
Returns
Equals(MessageView?)
public bool Equals(MessageView? other)Parameters
otherMessageView?
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 ==(MessageView?, MessageView?)
public static bool operator ==(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?
Returns
operator ==(MessageView?, MessageView?)
public static bool operator ==(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?
Returns
operator ==(MessageView?, MessageView?)
public static bool operator ==(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?
Returns
operator !=(MessageView?, MessageView?)
public static bool operator !=(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?
Returns
operator !=(MessageView?, MessageView?)
public static bool operator !=(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?
Returns
operator !=(MessageView?, MessageView?)
public static bool operator !=(MessageView? left, MessageView? right)Parameters
leftMessageView?rightMessageView?