/// <summary>
        /// <see cref="Sif.Framework.Service.Sessions.ISessionService.StoreSession(System.String, System.String, System.String, System.String, System.String, System.String)"/>
        /// </summary>
        public void StoreSession(string applicationKey, string sessionToken, string environmentUrl, string solutionId = null, string userToken = null, string instanceId = null)
        {
            if (HasSession(applicationKey, solutionId, userToken, instanceId))
            {
                string message = String.Format("Session with the following credentials already exists - [applicationKey={0}]{1}{2}{3}.",
                    applicationKey,
                    (solutionId == null ? "" : "[solutionId=" + solutionId + "]"),
                    (userToken == null ? "" : "[userToken=" + userToken + "]"),
                    (instanceId == null ? "" : "[instanceId=" + instanceId + "]"));
                throw new ConfigurationErrorsException(message);
            }

            if (HasSession(sessionToken))
            {
                string message = String.Format("Session already exists with a session token of {0}.", sessionToken);
                throw new ConfigurationErrorsException(message);
            }

            SessionElement sessionElement = new SessionElement(applicationKey, sessionToken, environmentUrl, solutionId, userToken, instanceId);
            SessionsSection.Sessions.Add(sessionElement);
            Configuration.Save(ConfigurationSaveMode.Modified);
            ConfigurationManager.RefreshSection(SifFrameworkSectionGroup.SectionGroupReference);
        }
 /// <summary>
 /// <see cref="System.Configuration.ConfigurationElementCollection.BaseAdd(System.Configuration.ConfigurationElement)"/>
 /// </summary>
 public void Add(SessionElement session)
 {
     base.BaseAdd(session);
 }
 /// <summary>
 /// <see cref="System.Configuration.ConfigurationElementCollection.BaseAdd(System.Configuration.ConfigurationElement)"/>
 /// </summary>
 public void Add(SessionElement session)
 {
     base.BaseAdd(session);
 }
 /// <summary>
 /// Removes the passed session element from the collection.
 /// <see cref="System.Configuration.ConfigurationElementCollection.BaseRemove(System.Object)"/>
 /// </summary>
 public void Remove(SessionElement session)
 {
     base.BaseRemove(GetElementKey(session));
 }
 /// <summary>
 /// Removes the passed session element from the collection.
 /// <see cref="System.Configuration.ConfigurationElementCollection.BaseRemove(System.Object)"/>
 /// </summary>
 public void Remove(SessionElement session)
 {
     base.BaseRemove(GetElementKey(session));
 }