public SuppressionFixerFixAllProviderInfo( FixAllProvider fixAllProvider, IConfigurationFixProvider suppressionFixer, ImmutableArray <FixAllScope> supportedScopes) : base(fixAllProvider, supportedScopes) { _canBeSuppressedOrUnsuppressed = suppressionFixer.IsFixableDiagnostic; }
public WrapperCodeFixProvider( IConfigurationFixProvider suppressionFixProvider, IEnumerable <string> diagnosticIds ) { _suppressionFixProvider = suppressionFixProvider; _originalDiagnosticIds = diagnosticIds.Distinct().ToImmutableArray(); }
/// <summary> /// Gets an optional <see cref="FixAllProviderInfo"/> for the given suppression fix provider. /// </summary> private static FixAllProviderInfo?CreateWithSuppressionFixer(IConfigurationFixProvider provider) { var fixAllProvider = provider.GetFixAllProvider(); if (fixAllProvider == null) { return(null); } var scopes = fixAllProvider.GetSupportedFixAllScopes().ToImmutableArrayOrEmpty(); if (scopes.IsEmpty) { return(null); } return(new SuppressionFixerFixAllProviderInfo(fixAllProvider, provider, scopes)); }