イベント
イベント
主なイベントタイプ
nc.dispatcher.onMessageReceived += message =>
{
Console.WriteLine("received a new message: ", message);
}イベントハンドラ接続と解除
Last updated
nc.dispatcher.onMessageReceived += message =>
{
Console.WriteLine("received a new message: ", message);
}Last updated
// メッセージ受信
nc.dispatcher.onMessageReceived += e =>
{
Console.WriteLine("onMessageReceived: ", e);
};
// メッセージ削除
nc.dispatcher.onMessageDeleted += e =>
{
Console.WriteLine("onMessageDeleted: ", e);
};
// エラーメッセージ
nc.dispatcher.onErrorReceived += e =>
{
Console.WriteLine("[CloudChatSample] onErrorReceived: ", e);
};
// アクセス成功
nc.dispatcher.onConnected += e =>
{
Console.WriteLine("[CloudChatSample] Connected to server with id: {0} ", e);
};
// アクセス終了
nc.dispatcher.onDisconnected += e =>
{
Console.WriteLine("Disconnected");
};
// タイピングを開始する場合
nc.dispatcher.onStartTyping += e =>
{
Console.WriteLine("onStartTyping: ", e);
};
// タイピングを終了する場合
nc.dispatcher.onStopTyping += e =>
{
Console.WriteLine("onStopTyping: ", e);
};
// ユーザーがチャンネルを登録した場合
nc.dispatcher.onMemberAdded += e =>
{
Console.WriteLine("onMemberAdded: ", e);
};
// ユーザーがチャンネル登録を解除した場合
nc.dispatcher.onMemberLeft += e =>
{
Console.WriteLine("[CloudChatSample] onMemberLeft: ", e);
};
// チャンネルからユーザーが停止された場合
nc.dispatcher.onMemberBanned += e =>
{
Console.WriteLine("[CloudChatSample] onMemberBanned: ", e);
};
// チャンネルからユーザーが退会した場合
nc.dispatcher.onMemberDeleted += e =>
{
Console.WriteLine("[CloudChatSample] onMemberDeleted: ", e);
};
nc.dispatcher.onSubscriptionUpdated += e =>
{
Console.WriteLine("[CloudChatSample] onSubscriptionUpdated: ", e);
};