Class MessageInput
- Namespace
- idunno.Bluesky.Chat
- Assembly
- idunno.Bluesky.dll
Represents a message in a chat conversation.
public sealed record MessageInput : IEquatable<MessageInput>Inheritance
Implements
Inherited Members
Constructors
MessageInput(string, ICollection<Facet>?, EmbeddedRecord?, ReplyReference?)
Creates a new instance of idunno.Bluesky.Chat.MessageInput.
public MessageInput(string text, ICollection<Facet>? facets = null, EmbeddedRecord? embed = null, ReplyReference? replyTo = null)Parameters
textstring-
The text for the message.
facetsICollection<Facet>?-
The rich text idunno.Bluesky.RichText.Facets for the message, if any.
embedEmbeddedRecord?-
The idunno.Bluesky.Embed.EmbeddedRecord for the message, if any.
replyToReplyReference?-
The message this message is replying to. The referenced message must be in the same conversation.
Exceptions
- ArgumentNullException
-
Thrown when
textis null. - ArgumentOutOfRangeException
-
Thrown when
textexceeds the maximum allowed length.
MessageInput(string, ICollection<Facet>?, EmbeddedRecord?, ReplyReference?)
Creates a new instance of idunno.Bluesky.Chat.MessageInput.
public MessageInput(string text, ICollection<Facet>? facets = null, EmbeddedRecord? embed = null, ReplyReference? replyTo = null)Parameters
textstring-
The text for the message.
facetsICollection<Facet>?-
The rich text idunno.Bluesky.RichText.Facets for the message, if any.
embedEmbeddedRecord?-
The idunno.Bluesky.Embed.EmbeddedRecord for the message, if any.
replyToReplyReference?-
The message this message is replying to. The referenced message must be in the same conversation.
Exceptions
- ArgumentNullException
-
Thrown when
textis null. - ArgumentOutOfRangeException
-
Thrown when
textexceeds the maximum allowed length.
MessageInput(string, ICollection<Facet>?, EmbeddedRecord?, ReplyReference?)
Creates a new instance of idunno.Bluesky.Chat.MessageInput.
public MessageInput(string text, ICollection<Facet>? facets = null, EmbeddedRecord? embed = null, ReplyReference? replyTo = null)Parameters
textstring-
The text for the message.
facetsICollection<Facet>?-
The rich text idunno.Bluesky.RichText.Facets for the message, if any.
embedEmbeddedRecord?-
The idunno.Bluesky.Embed.EmbeddedRecord for the message, if any.
replyToReplyReference?-
The message this message is replying to. The referenced message must be in the same conversation.
Exceptions
- ArgumentNullException
-
Thrown when
textis null. - ArgumentOutOfRangeException
-
Thrown when
textexceeds the maximum allowed length.
Properties
Embed
Gets the embedded record of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbeddedBase? Embed { get; init; }Property Value
Embed
Gets the embedded record of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbeddedBase? Embed { get; init; }Property Value
Embed
Gets the embedded record of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public EmbeddedBase? Embed { get; init; }Property Value
Facets
Gets the rich text idunno.Bluesky.RichText.Facets of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyCollection<Facet>? Facets { get; init; }Property Value
Remarks
A facet's range is a pair of byte offsets into idunno.Bluesky.Chat.MessageInput.Text, so facets are only meaningful alongside the text they were extracted from. The value supplied is copied, so later changes to the collection passed in are not reflected here.
Facets
Gets the rich text idunno.Bluesky.RichText.Facets of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyCollection<Facet>? Facets { get; init; }Property Value
Remarks
A facet's range is a pair of byte offsets into idunno.Bluesky.Chat.MessageInput.Text, so facets are only meaningful alongside the text they were extracted from. The value supplied is copied, so later changes to the collection passed in are not reflected here.
Facets
Gets the rich text idunno.Bluesky.RichText.Facets of the message, if any.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IReadOnlyCollection<Facet>? Facets { get; init; }Property Value
Remarks
A facet's range is a pair of byte offsets into idunno.Bluesky.Chat.MessageInput.Text, so facets are only meaningful alongside the text they were extracted from. The value supplied is copied, so later changes to the collection passed in are not reflected here.
ReplyTo
Gets the message this message is replying to. The referenced message must be in the same conversation.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReplyReference? ReplyTo { get; init; }Property Value
ReplyTo
Gets the message this message is replying to. The referenced message must be in the same conversation.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReplyReference? ReplyTo { get; init; }Property Value
ReplyTo
Gets the message this message is replying to. The referenced message must be in the same conversation.
[JsonInclude]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReplyReference? ReplyTo { get; init; }Property Value
Text
Gets the text of the message
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Remarks
The value supplied is validated against the same limits the constructor applies, so the limits cannot be bypassed by assigning in an object initializer or a with expression.
Exceptions
- ArgumentNullException
-
Thrown when the value set is null.
- ArgumentOutOfRangeException
-
Thrown when the value set exceeds the maximum allowed length.
Text
Gets the text of the message
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Remarks
The value supplied is validated against the same limits the constructor applies, so the limits cannot be bypassed by assigning in an object initializer or a with expression.
Exceptions
- ArgumentNullException
-
Thrown when the value set is null.
- ArgumentOutOfRangeException
-
Thrown when the value set exceeds the maximum allowed length.
Text
Gets the text of the message
[JsonInclude]
[JsonRequired]
public string Text { get; init; }Property Value
Remarks
The value supplied is validated against the same limits the constructor applies, so the limits cannot be bypassed by assigning in an object initializer or a with expression.
Exceptions
- ArgumentNullException
-
Thrown when the value set is null.
- ArgumentOutOfRangeException
-
Thrown when the value set exceeds the maximum allowed length.
Methods
<Clone>$()
public MessageInput <Clone>$()Returns
<Clone>$()
public MessageInput <Clone>$()Returns
<Clone>$()
public MessageInput <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageInput?)
public bool Equals(MessageInput? other)Parameters
otherMessageInput?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageInput?)
public bool Equals(MessageInput? other)Parameters
otherMessageInput?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(MessageInput?)
public bool Equals(MessageInput? other)Parameters
otherMessageInput?
Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(MessageInput?, MessageInput?)
public static bool operator ==(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?
Returns
operator ==(MessageInput?, MessageInput?)
public static bool operator ==(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?
Returns
operator ==(MessageInput?, MessageInput?)
public static bool operator ==(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?
Returns
operator !=(MessageInput?, MessageInput?)
public static bool operator !=(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?
Returns
operator !=(MessageInput?, MessageInput?)
public static bool operator !=(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?
Returns
operator !=(MessageInput?, MessageInput?)
public static bool operator !=(MessageInput? left, MessageInput? right)Parameters
leftMessageInput?rightMessageInput?