Exemplo n.º 1
0
 /// <summary>
 /// Raises the <see cref="E:ClientSessionTerminated"/> event.
 /// </summary>
 /// <param name="args">The <see cref="LoginEventArgs"/> instance containing the event data.</param>
 protected void OnClientSessionTerminated(LoginEventArgs args)
 {
     if (ClientSessionTerminated != null)
     {
         // fire event handlers asynchronously
         ThreadPool.QueueUserWorkItem(_ =>
         {
             try
             {
                 ClientSessionTerminated?.Invoke(this, args);
             }
             catch (Exception ex)
             {
                 Trace.WriteLine("Warning: ClientSessionTerminated event handler has thrown" +
                                 " an exception of type {0}: {1} {2}", ex.GetType(), ex.Message, ex.StackTrace);
             }
         });
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Fires "ClientSessionTerminated" event.
 /// </summary>
 /// <param name="e">Arguments</param>
 protected internal void OnClientSessionTerminated(LoginEventArgs e)
 {
     ClientSessionTerminated?.Invoke(this, e);
 }