ChatRoomSession Class

Definition

Enables a user to join a chat room. When joined to a chat room, a user can send and receive chat messages in real time.

public ref class ChatRoomSession
public class ChatRoomSession
type ChatRoomSession = class
Public Class ChatRoomSession
Inheritance
ChatRoomSession

Remarks

Prior to invoking other methods on this class, the user must first choose a chat room to join, and invoke one of the overloaded joining methods. Additionally, an application should subscribe to any interested events before invoking a joining method.

Constructors

ChatRoomSession(PersistentChatEndpoint)

Initializes a new instance of the ChatRoomSession class.

Properties

AddIn

Gets the current add-in that applies to this chat room.

CanChat

Gets a Boolean value indicating whether the current user can chat. If IsAuditorium is true, the user must have the Presenter permission to chat.

CanManage

Gets a Boolean value indicating whether the current user can manage this chat room.

ChatRoomUri

Gets the URI of the chat room to which this session is joined. If the session is not joined, this property is null.

Description

Gets the description of the chat room to which this session is joined. If the session is not joined, this property is null.

Endpoint

Gets the endpoint on which this session was established.

IsAuditorium

Gets the value indicating if the chat room is an auditorium chat room. In an auditorium chat room, only those members who have been granted Presenter privileges may post messages.

IsFilePostAllowed

Gets a Boolean value indicating whether file posting is allowed in the chat room.

IsInvite

Gets a Boolean value indicating if members are invited to the chat room.

IsLogged

Gets a Boolean value indicating if the chat room is logged.

Name

Gets the name of the chat room to which this session is joined. If the session is not joined, this property is null.

ParentCategoryUri

Gets the URI of the category for the chat room to which this session is joined. If the session is not joined, this property is null.

Participants

Gets the participant list of the chat room to which this session is joined.

State

Gets a value indicating the state of this chat room session.

VisibleOnlyToMembers

Gets a Boolean value indicating if the room is private and visible only to members.

Methods

BeginDownloadFile(ChatRoomFileDownloadJob, AsyncCallback, Object)

Downloads a file from the chat room.

BeginGetHiddenParticipantList(AsyncCallback, Object)

Get the current list of participants for a large chat room.

BeginGetRecentChatHistory(Int32, AsyncCallback, Object)

Returns the requested number of recent chat messages for this chat room, up to the server limit.

BeginJoin(ChatRoomSummary, AsyncCallback, Object)

Joins the chat room indicated by the given ChatRoomSummary.

BeginJoin(String, AsyncCallback, Object)

Joins the chat room with the given name.

BeginJoin(Uri, AsyncCallback, Object)

Joins the chat room indicated by the given URI.

BeginLeave(AsyncCallback, Object)

Leaves the chat room and ends a user's current session which was initiated by a joining operation.

BeginQueryChatHistory(ChatHistoryQueryOptions, AsyncCallback, Object)

Queries the chat history of this chat room.

BeginQueryChatHistory(String, Boolean, Boolean, AsyncCallback, Object)

Query the chat history of this chat room.

BeginSendChatMessage(FormattedOutboundChatMessage, AsyncCallback, Object)

Sends a formatted chat message to a joined chat room.

BeginSendChatMessage(FormattedOutboundChatMessage, String, AsyncCallback, Object)

Sends a formatted chat message with RTF-formatted content to a chat room.

BeginSendChatMessage(String, AsyncCallback, Object)

Sends a chat message to a joined chat room.

BeginSendChatMessage(String, Boolean, AsyncCallback, Object)

Sends a high priority alert message to the joined chat room.

BeginSendChatMessage(String, Boolean, String, AsyncCallback, Object)

Send a RTF-formatted high priority alert message to the joined chat room.

BeginSendChatMessage(String, String, AsyncCallback, Object)

Sends an RTF-formatted chat message to the joined chat room.

BeginSendChatMessage(String, String, Boolean, AsyncCallback, Object)

Send a story message to the joined chat room.

BeginSendChatMessage(String, String, String, Boolean, AsyncCallback, Object)

Send a RTF-formatted story message to the joined chat room.

BeginUploadFile(ChatRoomFileUploadJob, AsyncCallback, Object)

Uploads a file to the chat room.

EndDownloadFile(IAsyncResult)

Completes the asynchronous request initiated by BeginDownloadFile(ChatRoomFileDownloadJob, AsyncCallback, Object)

EndGetHiddenParticipantList(IAsyncResult)

Completes the asynchronous request initiated by BeginGetHiddenParticipantList(AsyncCallback, Object)

EndGetRecentChatHistory(IAsyncResult)

Completes the asynchronous request initiated by BeginGetRecentChatHistory(Int32, AsyncCallback, Object)

EndJoin(IAsyncResult)

Completes the asynchronous request initiated by BeginJoin(ChatRoomSummary, AsyncCallback, Object), BeginJoin(String, AsyncCallback, Object), or BeginJoin(Uri, AsyncCallback, Object)

EndLeave(IAsyncResult)

Completes the asynchronous request initiated by BeginLeave(AsyncCallback, Object)

EndQueryChatHistory(IAsyncResult)

Completes the asynchronous request initiated by BeginQueryChatHistory(ChatHistoryQueryOptions, AsyncCallback, Object) or BeginQueryChatHistory(String, Boolean, Boolean, AsyncCallback, Object)

EndSendChatMessage(IAsyncResult)

Completes the asynchronous request initiated by BeginSendChatMessage(String, AsyncCallback, Object), BeginSendChatMessage(String, Boolean, AsyncCallback, Object), or BeginSendChatMessage(String, String, Boolean, AsyncCallback, Object).

EndUploadFile(IAsyncResult)

Completes the asynchronous request initiated by BeginUploadFile(ChatRoomFileUploadJob, AsyncCallback, Object)

Operators

Implicit(ChatRoomSession to ChatRoomSummary)

Performs an implicit conversion from ChatRoomSession to ChatRoomSummary.

Events

ChatMessageReceived

Raised when a chat message is received. For best results, register for this event before invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) on the session.

ChatRoomPropertiesChanged

Raised when the properties of the chat room change. To catch the events, an application must register for this event before invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) on the session.

ChatRoomSessionStateChanged

Raised when the state of this chat room session changes. This event will fire when invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) or BeginLeave(AsyncCallback, Object) on the session. It will also be fired if the membership privileges of the currently logged in user change, or if the PersistentChatEndpoint is disconnected. For best results, register for this event before invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) on the session.

ParticipantAttendanceChanged

Raised when a participant joins or leaves the chat room. To catch the events, an application must register for this event before invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) on the session.

ParticipantPrivilegeChanged

Raised when the privileges of an active user in this chat room change.
Privileges monitored by this event include Manager and Presenter. To catch the events, an application must register for this event before invoking BeginJoin(ChatRoomSummary, AsyncCallback, Object) on the session.

Applies to