// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Threading;
usingMicrosoft.CodeAnalysis.Diagnostics;
usingMicrosoft.CodeAnalysis.Options;
namespaceMicrosoft.CodeAnalysis.CodeStyle
{
// This part contains all the logic for hooking up the DiagnosticAnalyzer to the CodeStyleProvider.
// All the code in this part is an implementation detail and is intentionally private so that
// subclasses cannot change anything. All code relevant to subclasses relating to analysis
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
usingSystem.Threading;
usingSystem.Threading.Tasks;
usingMicrosoft.CodeAnalysis.CodeFixes;
usingMicrosoft.CodeAnalysis.Editing;
namespaceMicrosoft.CodeAnalysis.CodeStyle
{
// This part contains all the logic for hooking up the CodeFixProvider to the CodeStyleProvider.
// All the code in this part is an implementation detail and is intentionally private so that
// subclasses cannot change anything. All code relevant to subclasses relating to fixing is
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Threading.Tasks;
usingMicrosoft.CodeAnalysis.CodeRefactorings;
namespaceMicrosoft.CodeAnalysis.CodeStyle
{
// This part contains all the logic for hooking up the CodeRefactoring to the CodeStyleProvider.
// All the code in this part is an implementation detail and is intentionally private so that
// subclasses cannot change anything. All code relevant to subclasses relating to refactorings
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Immutable;
usingSystem.Diagnostics;
usingSystem.Threading;
usingSystem.Threading.Tasks;
usingMicrosoft.CodeAnalysis.CodeActions;
usingMicrosoft.CodeAnalysis.CodeFixes;
usingMicrosoft.CodeAnalysis.Diagnostics;
usingMicrosoft.CodeAnalysis.Editing;
usingMicrosoft.CodeAnalysis.Options;
usingMicrosoft.CodeAnalysis.Text;
namespaceMicrosoft.CodeAnalysis.CodeStyle
{
// This file contains the "protected" surface area of the AbstractCodeStyleProvider.
// It specifically is all the extensibility surface that a subclass needs to fill in
// in order to properly expose a code style analyzer/fixer/refactoring.
/// <summary>
/// This is the core class a code-style feature needs to derive from. All logic related to the
/// feature will then be contained in this class. This class will take care of many bit of
/// common logic that all code style providers would have to care about and can thus do that
/// logic in a consistent fashion without all providers having to do the same. For example,
/// this class will check the current value of the code style option. If it is 'refactoring
/// only', it will not bother running any of the DiagnosticAnalyzer codepaths, and will only run