Exemple #1
0
        public bool AddSessionName(string name)
        {
            if (SessionNames.Contains(name))
            {
                return(false);
            }

            SessionNames.Add(name);

            //generate sessions with the new name
            foreach (var sessionType in SessionTypes)
            {
                Sessions.Add(new Session(name, sessionType));
            }

            return(true);
        }
Exemple #2
0
        public bool RemoveSessionName(string sessionName)
        {
            if (!SessionNames.Contains(sessionName))
            {
                return(false);
            }

            //remove sessions with the given type
            foreach (var s in Sessions.Where(s => s.Name == sessionName).ToArray())
            {
                Sessions.Remove(s);
            }

            SessionNames.Remove(sessionName);

            return(true);
        }