Пример #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);
 }