OnUnsubscribed
How do I use On Unsubscribed
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
330 | public void OnUnsubscribed(string[] channels) | 1 |
765 | this.listener.OnUnsubscribed(channelsInRequest); | 2 |
File name: ChatClient.cs
Copy
756 private void HandleUnsubscribeEvent(EventData eventData)
757 {
758 var channelsInRequest = (string[])eventData[ChatParameterCode.Channels];
759 for (var i = 0; i < channelsInRequest.Length; i++)
760 {
761 string channelName = channelsInRequest[i];
762 this.PublicChannels.Remove(channelName);
763 }
764
765 this.listener.OnUnsubscribed(channelsInRequest);
766 }
OnUnsubscribed 120 lượt xem
Gõ tìm kiếm nhanh...