src/Features/Core/Portable/CodeFixes/Configuration/ConfigurationUpdater.cs
/// <summary>
/// Updates or adds an .editorconfig <see cref="AnalyzerConfigDocument"/> to the given <paramref name="project"/>
/// so that the severity of the given <paramref name="diagnostic"/> is configured to be the given
/// <paramref name="editorConfigSeverity"/>.
/// </summary>
Updates or adds an .editorconfig  to the given
so that the severity of the given  is configured to be the given
.
Updates or adds an . editorconfig to the given so that the severity of the given is configured to be the given .
public static Task<Solution> ConfigureSeverityAsync(
            string editorConfigSeverity,
            Diagnostic diagnostic,
            Project project,
            CancellationToken cancellationToken)
        {
            var codeStyleOptionValues = GetCodeStyleOptionValuesForDiagnostic(diagnostic, project);
            ConfigurationUpdater updater;
            if (!codeStyleOptionValues.IsEmpty)
            {
                return ConfigureCodeStyleOptionsAsync(
                    codeStyleOptionValues.Select(t => (t.optionName, t.currentOptionValue, editorConfigSeverity, t.isPerLanguage)),
                    diagnostic, project, configurationKind: ConfigurationKind.Severity, cancellationToken);
            }
            else
            {
                updater = new ConfigurationUpdater(optionNameOpt: null, newOptionValueOpt: null, editorConfigSeverity,
                    configurationKind: ConfigurationKind.Severity, diagnostic, categoryToBulkConfigure: null, isPerLanguage: false, project, cancellationToken);
                return updater.ConfigureAsync();
            }
        }
public static Task < Solution > ConfigureSeverityAsync ( string editorConfigSeverity , Diagnostic diagnostic , Project project , CancellationToken cancellationToken ) { var codeStyleOptionValues = GetCodeStyleOptionValuesForDiagnostic ( diagnostic , project ) ; ConfigurationUpdater updater ; if ( ! codeStyleOptionValues . IsEmpty ) { return ConfigureCodeStyleOptionsAsync ( codeStyleOptionValues . Select ( t => ( t . optionName , t . currentOptionValue , editorConfigSeverity , t . isPerLanguage ) ) , diagnostic , project , configurationKind : ConfigurationKind . Severity , cancellationToken ) ; } else { updater = new ConfigurationUpdater ( optionNameOpt : null , newOptionValueOpt : null , editorConfigSeverity , configurationKind : ConfigurationKind . Severity , diagnostic , categoryToBulkConfigure : null , isPerLanguage : false , project , cancellationToken ) ; return updater . ConfigureAsync ( ) ; } }
Updates or adds an .editorconfig  to the given
so that the severity of the given  is configured to be the given
.
Updates or adds an . editorconfig to the given so that the severity of the given is configured to be the given .
// For option based code style diagnostic, try to find the .editorconfig key-value pair for the // option setting.
editorConfigSeverity
string
diagnostic
Diagnostic
project
Project
cancellationToken
CancellationToken