예제 #1
0
        /// <summary>
        /// Times the capture.
        /// </summary>
        /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
        protected void TimeCapture(ClientConnectionLostEventArgs e)
        {
            var clientDatabaseId = Repository.Client.GetClientDatabaseIdByClientId(e.ClientId);

            if (clientDatabaseId.HasValue)
            {
                Repository.Client.CaptureTime(clientDatabaseId.Value, null, Repository.Static.Now);
            }
        }
예제 #2
0
 /// <summary>
 /// Handles the ClientConnectionLost event of the Notifications control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 public void Notifications_ClientConnectionLost(object sender, ClientConnectionLostEventArgs e)
 {
     try
     {
         ManagerFactory.Invoke(e);
     }
     catch (Exception ex)
     {
         LogService.Error(ex.ToString());
     }
 }
예제 #3
0
 /// <summary>
 /// Invokes the specified e.
 /// </summary>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 public virtual void Invoke(ClientConnectionLostEventArgs e)
 {
     Manager.Where(m => m.CanInvoke(e)).ForEach(m => m.Invoke(e));
 }
예제 #4
0
 /// <summary>
 /// Invokes the specified e.
 /// </summary>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 public virtual void Invoke(ClientConnectionLostEventArgs e)
 {
 }
예제 #5
0
 /// <summary>
 /// Determines whether this instance can invoke the specified e.
 /// </summary>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 /// <returns>
 ///   <c>true</c> if this instance can invoke the specified e; otherwise, <c>false</c>.
 /// </returns>
 public virtual bool CanInvoke(ClientConnectionLostEventArgs e)
 {
     return(false);
 }
예제 #6
0
 private static void ClientLeft_ConnectionLost(object sender, ClientConnectionLostEventArgs e)
 {
     ClientLeft(e.ClientId);
 }
예제 #7
0
 /// <summary>
 /// Invokes the specified e.
 /// </summary>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 public override void Invoke(ClientConnectionLostEventArgs e)
 {
     TimeCapture(e);
 }
예제 #8
0
 /// <summary>
 /// Determines whether this instance can invoke the specified e.
 /// </summary>
 /// <param name="e">The <see cref="TS3QueryLib.Core.Server.Notification.EventArgs.ClientConnectionLostEventArgs"/> instance containing the event data.</param>
 /// <returns>
 ///   <c>true</c> if this instance can invoke the specified e; otherwise, <c>false</c>.
 /// </returns>
 public override bool CanInvoke(ClientConnectionLostEventArgs e)
 {
     return(true);
 }