/// <summary>
        /// Generate session id if needed and
        /// sends it back to the client.
        /// </summary>
        private string ProcessSessionId(MethodParameters methodParameters)
        {
            string sessionId = methodParameters.SessionId
                               ?? ServerSessionIdRepository.GenerateSessionId();

            sessionIdRepository.SessionId = sessionId;
            specialValues.Add("sessionId", sessionId);

            return(sessionId);
        }
 /// <summary>
 /// Generates a session ID and stores it in the client application
 /// </summary>
 protected void GenerateSessionId()
 {
     ClientApp.Resolve <ClientSessionIdRepository>().StoreSessionId(
         ServerSessionIdRepository.GenerateSessionId()
         );
 }