Пример #1
0
        public void ApplyTo(CodeFixSettings codeFixSettings)
        {
            codeFixSettings.Reset();

            Apply(VisualStudioSettings);

            if (UseConfigFile)
            {
                Apply(ConfigFileSettings);
            }

            void Apply(Settings settings)
            {
                if (settings != null)
                {
                    foreach (KeyValuePair <string, bool> kvp in settings.CodeFixes)
                    {
                        if (CodeFixIdentifier.TryParse(kvp.Key, out CodeFixIdentifier codeFixIdentifier))
                        {
                            codeFixSettings.Set(codeFixIdentifier, kvp.Value);
                        }
                    }
                }
            }
        }
Пример #2
0
        public void ApplyTo(CodeFixSettings settings)
        {
            settings.Reset();

            VisualStudioSettings.ApplyTo(settings);

            if (UseConfigFile)
            {
                ConfigFileSettings?.ApplyTo(settings);
            }
        }
Пример #3
0
 public void ApplyTo(CodeFixSettings codeFixSettings)
 {
     codeFixSettings.Reset(VisualStudio, (UseConfigFile) ? ConfigFile : null);
 }