/// <summary> /// get the current state, by clientID /// </summary> /// <param name="AClientID"></param> /// <returns></returns> static public TProgressState GetCurrentState(string AClientID) { TSession.RefreshFromDatabase(); if ((AClientID != null) && TSession.HasVariable(PROGRESSTRACKER + AClientID)) { TProgressState state = ((JObject)TSession.GetVariable(PROGRESSTRACKER + AClientID)).ToObject <TProgressState>(); if (state.PercentageDone > 100) { TLogging.Log("invalid percentage: " + state.PercentageDone.ToString()); state.PercentageDone = 99; } return(state); } return(new TProgressState()); }