Neco.Backend/SessionManager.cs
/// <summary>Removes all expired sessions from the collection of active sessions</summary>
/// <returns>Amount of removed sessions</returns>
Removes all expired sessions from the collection of active sessions
Removes all expired sessions from the collection of active sessions
public int RemoveExpiredSessions() {
            ICollection<Session> ExpiredSessions = Sessions.Where(S => S.Expired).ToHashSet();
            int RemovedCount = 0;
            foreach (Session S in ExpiredSessions) { if (Sessions.Remove(S)) RemovedCount++; }
            return RemovedCount;
        }
public int RemoveExpiredSessions ( ) { ICollection < Session > ExpiredSessions = Sessions . Where ( S => S . Expired ) . ToHashSet ( ) ; int RemovedCount = 0 ; foreach ( Session S in ExpiredSessions ) { if ( Sessions . Remove ( S ) ) RemovedCount ++ ; } return RemovedCount ; }
Removes all expired sessions from the collection of active sessions
Removes all expired sessions from the collection of active sessions
Amount of removed sessions
Amount of removed sessions