IReplacePropertyWithMethodsService.cs 1.4 KB
Newer Older
J
Jonathon Marolf 已提交
1 2 3
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
4

C
Cyrus Najmabadi 已提交
5
using System.Collections.Immutable;
6
using System.Threading;
7
using System.Threading.Tasks;
C
Cyrus Najmabadi 已提交
8
using Microsoft.CodeAnalysis.CodeRefactorings;
9 10 11 12 13 14 15
using Microsoft.CodeAnalysis.Editing;
using Microsoft.CodeAnalysis.Host;

namespace Microsoft.CodeAnalysis.ReplacePropertyWithMethods
{
    internal interface IReplacePropertyWithMethodsService : ILanguageService
    {
C
Cyrus Najmabadi 已提交
16
        Task<SyntaxNode> GetPropertyDeclarationAsync(CodeRefactoringContext context);
17

18 19
        Task ReplaceReferenceAsync(
            Document document,
20
            SyntaxEditor editor, SyntaxNode identifierName,
21
            IPropertySymbol property, IFieldSymbol propertyBackingField,
22 23
            string desiredGetMethodName, string desiredSetMethodName,
            CancellationToken cancellationToken);
24

C
Cyrus Najmabadi 已提交
25
        Task<ImmutableArray<SyntaxNode>> GetReplacementMembersAsync(
26 27
            Document document,
            IPropertySymbol property, SyntaxNode propertyDeclaration,
28 29
            IFieldSymbol propertyBackingField,
            string desiredGetMethodName,
30 31
            string desiredSetMethodName,
            CancellationToken cancellationToken);
32 33

        SyntaxNode GetPropertyNodeToReplace(SyntaxNode propertyDeclaration);
34
    }
S
Sam Harwell 已提交
35
}