/// <summary>
 /// Initializes a new instance of the <see cref="UserStateChangedEventArgs"/> class.
 /// </summary>
 /// <param name="message">
 /// Representation of event as a web message to be sent.
 /// </param>
 public UserStateChangedEventArgs(EventMessage message)
 {
     this.Message = message;
 }
예제 #2
0
 /// <summary>
 /// Asynchronously send event message to client(s) of stream handler.
 /// </summary>
 /// <param name="message">
 /// Event message to send.
 /// </param>
 /// <returns>
 /// Await-able task.
 /// </returns>
 private async Task SendEventMessageAsync(EventMessage message)
 {
     foreach (var channel in this.eventsChannels.SafeCopy())
     {
         await channel.SendMessagesAsync(message.ToTextMessage());
     }
 }
 /// <summary>
 /// Send UserStateChanged event if there are any subscribers.
 /// </summary>
 /// <param name="message">
 /// Message to send.
 /// </param>
 private void SendUserStateChanged(EventMessage message)
 {
     if (this.UserStateChanged != null)
     {
         this.UserStateChanged(this, new UserStateChangedEventArgs(message));
     }
 }