New to Telerik UI for WinFormsStart a free 30-day trial

Represents a chat message that contains text content and optionally file attachments.

Definition

Constructors

Initializes a new instance of the ChatTextMessage class with the specified message content, author, timestamp, and user data.

C#
public ChatTextMessage(string message, Author author, DateTime timeStamp, object userData)
Parameters:messagestring

The text content of the chat message.

authorAuthor

The author of the chat message. Cannot be null.

timeStampDateTime

The date and time when the message was created.

userDataobject

An object containing additional user-defined data associated with the message. Can be null.

Initializes a new instance of the ChatTextMessage class with the specified message content, author, and timestamp.

C#
public ChatTextMessage(string message, Author author, DateTime timeStamp)
Parameters:messagestring

The text content of the chat message. Cannot be null.

authorAuthor

The author of the chat message. Cannot be null.

timeStampDateTime

The date and time when the message was sent.

Initializes a new instance of the ChatTextMessage class with the specified message content, attachments, author, timestamp, and user data.

C#
public ChatTextMessage(string message, IEnumerable<PromptInputAttachedFile> attachments, Author author, DateTime timeStamp, object userData)
Parameters:messagestring

The text content of the chat message. Can be null when attachments are provided.

attachmentsIEnumerable<PromptInputAttachedFile>

The file attachments associated with this message. Can be null.

authorAuthor

The author of the chat message. Cannot be null.

timeStampDateTime

The date and time when the message was created.

userDataobject

An object containing additional user-defined data associated with the message. Can be null.

Initializes a new instance of the ChatTextMessage class with the specified message content, attachments, author, and timestamp.

C#
public ChatTextMessage(string message, IEnumerable<PromptInputAttachedFile> attachments, Author author, DateTime timeStamp)
Parameters:messagestring

The text content of the chat message. Can be null when attachments are provided.

attachmentsIEnumerable<PromptInputAttachedFile>

The file attachments associated with this message. Can be null.

authorAuthor

The author of the chat message. Cannot be null.

timeStampDateTime

The date and time when the message was sent.

Properties

Gets the file attachments associated with this message. The collection is mutable to allow callers to add or remove attachments before sending the message.

C#
public IList<PromptInputAttachedFile> Attachments { get; }

Gets a value indicating whether this message has any file attachments.

C#
public bool HasAttachments { get; }

Gets a value indicating whether this message has any text content.

C#
public bool HasText { get; }

Gets or sets the message content associated with this instance.

C#
public string Message { get; set; }