/// <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); } }
/// <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()); } }
/// <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)); }
/// <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) { }
/// <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); }
private static void ClientLeft_ConnectionLost(object sender, ClientConnectionLostEventArgs e) { ClientLeft(e.ClientId); }
/// <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); }
/// <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); }