/// <summary>
        /// Sets the state to the given memento.
        /// </summary>
        void IMementoCapable.SetMemento(Properties memento)
        {
            SetStartupProject(memento.Get("StartupProject", ""));
            string configuration = memento.Get("ActiveConfiguration", activeConfiguration);
            string platform      = memento.Get("ActivePlatform", activePlatform);

            // validate configuration and platform:
            IList <string> available = solution.GetConfigurationNames();

            if (!available.Contains(configuration))
            {
                configuration = available[0];
            }
            available = solution.GetPlatformNames();
            if (!available.Contains(platform))
            {
                platform = available[0];
            }

            this.ActiveConfiguration = configuration;
            this.ActivePlatform      = platform;

            this.properties = memento;
        }