Exemplo n.º 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);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void ApplyTo(CodeFixSettings settings)
 {
     settings.Set(CodeFixes);
 }