Exemplo n.º 1
0
        public override void LoadSettings(VisualStudio.IProjectSettings settings)
        {
            // TODO - Right now this class inherits from the view scaffolder model, so we need to call into the
            // base class to read those settings as well. We want to remove this inheritance at some point
            // and this method will have to change when we do.
            base.LoadSettings(settings);

            bool value;

            if (IsViewGenerationSupported)
            {
                if (settings.TryGetBool(SavedSettingsKeys.IsViewGenerationSelectedKey, out value))
                {
                    IsViewGenerationSelected = value;
                }
                else
                {
                    // default to true if views are supported and we have no saved state
                    IsViewGenerationSelected = true;
                }
            }

            if (IsAsyncSupported)
            {
                if (settings.TryGetBool(SavedSettingsKeys.IsAsyncSelectedKey, out value))
                {
                    IsAsyncSelected = value;
                }
            }
        }