Changeset 14989 for trunk/tools
- Timestamp:
- 05/16/17 15:56:38 (8 years ago)
- Location:
- trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/MissingStorableConstructor/MissingStorableConstructorFix.cs
r14985 r14989 15 15 namespace PersistenceCodeFix { 16 16 [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(MissingStorableConstructorFix)), Shared] 17 public sealed class MissingStorableConstructorFix : CodeFixProvider {17 public sealed class MissingStorableConstructorFix : CodeFixProvider, IDocumentCodeFixProvider { 18 18 private const string title = "Add storable constructor"; 19 19 … … 23 23 24 24 public sealed override FixAllProvider GetFixAllProvider() { 25 return WellKnownFixAllProviders.BatchFixer;25 return SequentialFixAllProvider.Instance; 26 26 } 27 27 … … 124 124 return members; 125 125 } 126 127 public Task<Document> FixDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) { 128 return AddStorableConstructor(document, (BaseTypeDeclarationSyntax)node, cancellationToken); 129 } 126 130 } 127 131 } -
trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/MissingStorableType/MissingStorableTypeFix.cs
r14985 r14989 14 14 namespace PersistenceCodeFix { 15 15 [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(MissingStorableTypeFix)), Shared] 16 public sealed class MissingStorableTypeFix : CodeFixProvider {16 public sealed class MissingStorableTypeFix : CodeFixProvider, IDocumentCodeFixProvider { 17 17 private const string title = "Add StorableType attribute"; 18 18 … … 22 22 23 23 public sealed override FixAllProvider GetFixAllProvider() { 24 return WellKnownFixAllProviders.BatchFixer;24 return SequentialFixAllProvider.Instance; 25 25 } 26 26 … … 113 113 return attrLists == null ? SyntaxFactory.List(new[] { attrList }) : attrLists.Add(attrList); 114 114 } 115 116 public Task<Document> FixDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) { 117 return AddStorableTypeAttribute(document, (BaseTypeDeclarationSyntax)node, cancellationToken); 118 } 115 119 } 116 120 } -
trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/ObsoleteStorableClass/ObsoleteStorableClassFix.cs
r14985 r14989 14 14 namespace PersistenceCodeFix { 15 15 [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(ObsoleteStorableClassFix)), Shared] 16 public sealed class ObsoleteStorableClassFix : CodeFixProvider {16 public sealed class ObsoleteStorableClassFix : CodeFixProvider, IDocumentCodeFixProvider { 17 17 private const string title = "Change to StorableType attribute"; 18 18 … … 22 22 23 23 public sealed override FixAllProvider GetFixAllProvider() { 24 return WellKnownFixAllProviders.BatchFixer;24 return SequentialFixAllProvider.Instance; 25 25 } 26 26 … … 91 91 return document.WithSyntaxRoot(newRoot); 92 92 } 93 94 public Task<Document> FixDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) { 95 return ChangeToStorableTypeAttribute(document, (AttributeSyntax)node, cancellationToken); 96 } 93 97 } 94 98 } -
trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix.csproj
r14985 r14989 42 42 <Compile Include="Analyzers\MissingStorableType\MissingStorableTypeAnalyzer.cs" /> 43 43 <Compile Include="Analyzers\MissingStorableType\MissingStorableTypeFix.cs" /> 44 <Compile Include="IDocumentCodeFixProvider.cs" /> 44 45 <Compile Include="Properties\AssemblyInfo.cs" /> 45 46 <Compile Include="Resources.Designer.cs"> … … 48 49 <DependentUpon>Resources.resx</DependentUpon> 49 50 </Compile> 51 <Compile Include="SequentialFixAllProvider.cs" /> 50 52 </ItemGroup> 51 53 <ItemGroup>
Note: See TracChangeset
for help on using the changeset viewer.