ChatMessageStore Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the methods and properties to read, manage and send messages. An application gets access to the message store using the static ChatMessageManager class.
public ref class ChatMessageStore sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ChatMessageStore final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ChatMessageStore
Public NotInheritable Class ChatMessageStore
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
App capabilities |
chat
chatSystem
smsSend
|
Remarks
Obtain an instance of this class by calling RequestStoreAsync.
Version history
Windows version | SDK version | Value added |
---|---|---|
1607 | 14393 | GetMessageBySyncIdAsync |
Properties
ChangeTracker |
Gets a ChatMessageChangeTracker class object for the message store. A message change tracker allows an application to monitor changes to messages in the message store. |
Methods
DeleteMessageAsync(String) |
Deletes a message from the chat message store. |
DownloadMessageAsync(String) |
Downloads a message specified by the identifier to the message store. |
ForwardMessageAsync(String, IIterable<String>) |
Asynchronously forwards the specified message to new recipients. |
GetConversationAsync(String, IIterable<String>) |
Asynchronously gets a ChatConversation by ID using the specified transports. |
GetConversationAsync(String) |
Asynchronously gets a ChatConversation by ID. |
GetConversationFromThreadingInfoAsync(ChatConversationThreadingInfo) |
Asynchronously gets a conversation based on a threading info object. |
GetConversationReader() |
Gets a new or existing ChatConversationReader for the message store. |
GetConversationReader(IIterable<String>) |
Gets a new or existing ChatConversationReader for the message store using the specified transports. |
GetMessageAsync(String) |
Retrieves a message specified by an identifier from the message store. |
GetMessageByRemoteIdAsync(String, String) |
Gets a message by its remote ID. |
GetMessageBySyncIdAsync(String) |
Gets a message by the sync ID. |
GetMessageReader() |
Gets a ChatMessageReader class object which provides a message collection from the message store. |
GetMessageReader(TimeSpan) |
Gets a ChatMessageReader class object which provides a message collection from the message store. The collection of messages is limited to the time span provided. |
GetSearchReader(ChatQueryOptions) |
Gets a new or existing ChatSearchReader to be used to search for messages. |
GetUnseenCountAsync() |
Asynchronously gets the number of unread chat messages. |
GetUnseenCountAsync(IIterable<String>) |
Asynchronously gets the number of unread chat messages using the specified transports. |
MarkAsSeenAsync() |
Asynchronously marks all transport messages as seen. |
MarkAsSeenAsync(IIterable<String>) |
Asynchronously marks all transport messages as seen. |
MarkMessageReadAsync(String) |
Marks a specified message in the store as already read. |
RetrySendMessageAsync(String) |
Attempts a retry of sending a specified message from the message store. |
SaveMessageAsync(ChatMessage) |
Asynchronously saves a message to the ChatMessageStore. |
SendMessageAsync(ChatMessage) |
Attempts to send a chat message. The message is saved to the message store as part of the send operation. |
TryCancelDownloadMessageAsync(String) |
Asynchronously attempts to cancel downloading the specified message. |
TryCancelSendMessageAsync(String) |
Asynchronously attempts to cancel sending the specified message. |
ValidateMessage(ChatMessage) |
Checks if a chat message is valid and returns the validation result. |
Events
MessageChanged |
An event that occurs when a message in the message store is changed. |
StoreChanged |
Occurs when something in the ChatMessageStore has changed. |