提交 36d1391a 编写于 作者: S Sam Harwell

Rename Formatter to FormatterHelper in the code style layer

Visual Basic does not support extern alias directives, so we cannot
disambiguate the references.
上级 e8d15667
......@@ -38,7 +38,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisCSharpWorkspacesFixedVersion)" />
</ItemGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" Aliases="global,CodeStyle" />
<ProjectReference Include="..\..\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" />
<ProjectReference Include="..\..\Core\CodeFixes\Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj" />
<ProjectReference Include="..\Analyzers\Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj" />
</ItemGroup>
......
......@@ -16,7 +16,7 @@ namespace Microsoft.CodeAnalysis.Formatting
/// <summary>
/// Formats whitespace in documents or syntax trees.
/// </summary>
internal static class Formatter
internal static class FormatterHelper
{
/// <summary>
/// Gets the formatting rules that would be applied if left unspecified.
......
......@@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis.Text;
#if CODE_STYLE
using Formatter = Microsoft.CodeAnalysis.Formatting.FormatterHelper;
using FormatterState = Microsoft.CodeAnalysis.Formatting.ISyntaxFormattingService;
using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions;
#else
......
......@@ -2,16 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if CODE_STYLE
extern alias CodeStyle;
#endif
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Text;
#if CODE_STYLE
using Formatter = CodeStyle::Microsoft.CodeAnalysis.Formatting.Formatter;
using Formatter = Microsoft.CodeAnalysis.Formatting.FormatterHelper;
using FormatterState = Microsoft.CodeAnalysis.Formatting.ISyntaxFormattingService;
using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions;
#else
......
......@@ -12,12 +12,11 @@
#if CODE_STYLE
using OptionSet = Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptions;
using Formatter = Microsoft.CodeAnalysis.Formatting.FormatterHelper;
#endif
namespace Microsoft.CodeAnalysis.CodeStyle
{
extern alias CodeStyle;
using Formatter = CodeStyle::Microsoft.CodeAnalysis.Formatting.Formatter;
using ISyntaxFormattingService = ISyntaxFormattingService;
internal abstract class AbstractFormattingCodeFixProvider : CodeFixProvider
......
......@@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisWorkspacesCommonFixedVersion)" />
</ItemGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" Aliases="global,CodeStyle" />
<ProjectReference Include="..\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes" />
......
......@@ -37,7 +37,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="$(MicrosoftCodeAnalysisVisualBasicWorkspacesFixedVersion)" />
</ItemGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" Aliases="global,CodeStyle" />
<ProjectReference Include="..\..\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj" />
<ProjectReference Include="..\..\Core\CodeFixes\Microsoft.CodeAnalysis.CodeStyle.Fixes.csproj" />
<ProjectReference Include="..\Analyzers\Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj" />
</ItemGroup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册