Ejemplo n.º 1
0
 public static bool IsRepresentingDisconnectedStamp(string disconnectedStamp, string lastStamp)
 {
     // If provided last stamp length is equal with the length of the current sessionId,
     // and its associated with the same sessionId as disconnectedStamp,
     // assume that the provided stamp does not contain timestamp session, as well as
     // and represent disconnected session.
     return((lastStamp.Length == _sessionId.Length) && (StampsTranslator.GetSessionIdStampSection(disconnectedStamp) == StampsTranslator.GetSessionIdStampSection(lastStamp)));
 }
Ejemplo n.º 2
0
            // Answers the question whether the provided stamp is representing current session.
            public static bool IsRepresentingThisSession(string stamp)
            {
                if (string.IsNullOrWhiteSpace(stamp))
                {
                    return(false);
                }

                // if sessionId section of provided stamp is equal this sessionId return true, otherwise false.
                return(StampsTranslator.GetSessionIdStampSection(stamp) == SessionsRepository._sessionId);
            }
Ejemplo n.º 3
0
 // Answers the question whether two provided stamps represent the same session
 public static bool IsRepresentingSameSession(string stamp1, string stamp2)
 {
     // If both stamp when used as parameters for this.GetSessionIdStampSection(string stamp)
     // method return the same value, assume that the represent the same session.
     return(StampsTranslator.GetSessionIdStampSection(stamp1) == StampsTranslator.GetSessionIdStampSection(stamp2));
 }