diff --git a/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs b/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs index f2acd26494d9d69b44d2a19b17532f88690513d9..a2c38b001e051889194052923088cddfb9c4a7ef 100644 --- a/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs +++ b/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs @@ -37,7 +37,7 @@ public SyntaxNode GetPropertyDeclaration(SyntaxToken token) return containingProperty; } - public IEnumerable GetReplacementMembers( + public IList GetReplacementMembers( Document document, IPropertySymbol property, SyntaxNode propertyDeclarationNode, @@ -48,16 +48,13 @@ public SyntaxNode GetPropertyDeclaration(SyntaxToken token) var propertyDeclaration = propertyDeclarationNode as PropertyDeclarationSyntax; if (propertyDeclaration == null) { - return SpecializedCollections.EmptyEnumerable(); + return SpecializedCollections.EmptyList(); } - var generator = SyntaxGenerator.GetGenerator(document); - var members = ConvertPropertyToMembers( - generator, property, + return ConvertPropertyToMembers( + SyntaxGenerator.GetGenerator(document), property, propertyDeclaration, propertyBackingField, desiredGetMethodName, desiredSetMethodName); - - return members; } private List ConvertPropertyToMembers( diff --git a/src/Features/Core/Portable/ReplacePropertyWithMethods/IReplacePropertyWithMethodsService.cs b/src/Features/Core/Portable/ReplacePropertyWithMethods/IReplacePropertyWithMethodsService.cs index 742ab76bfcaadc39f5a5c3e10013b350721eab8f..512cc2f3099ce89d5a2dc64c630c10925ed1dffc 100644 --- a/src/Features/Core/Portable/ReplacePropertyWithMethods/IReplacePropertyWithMethodsService.cs +++ b/src/Features/Core/Portable/ReplacePropertyWithMethods/IReplacePropertyWithMethodsService.cs @@ -17,7 +17,7 @@ internal interface IReplacePropertyWithMethodsService : ILanguageService IPropertySymbol property, IFieldSymbol propertyBackingField, string desiredGetMethodName, string desiredSetMethodName); - IEnumerable GetReplacementMembers( + IList GetReplacementMembers( Document document, IPropertySymbol property, SyntaxNode propertyDeclaration, IFieldSymbol propertyBackingField, diff --git a/src/Features/VisualBasic/Portable/ReplacePropertyWithMethods/VisualBasicReplacePropertyWithMethods.vb b/src/Features/VisualBasic/Portable/ReplacePropertyWithMethods/VisualBasicReplacePropertyWithMethods.vb index 2bbf196f2a2ee9e0ceb23e330bef08fb6e3417fe..1d2c02dc92df2584623adbf5c3db64a828459f2a 100644 --- a/src/Features/VisualBasic/Portable/ReplacePropertyWithMethods/VisualBasicReplacePropertyWithMethods.vb +++ b/src/Features/VisualBasic/Portable/ReplacePropertyWithMethods/VisualBasicReplacePropertyWithMethods.vb @@ -43,11 +43,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeRefactorings.ReplaceMethodWithP propertyDeclarationNode As SyntaxNode, propertyBackingField As IFieldSymbol, desiredGetMethodName As String, - desiredSetMethodName As String) As IEnumerable(Of SyntaxNode) Implements IReplacePropertyWithMethodsService.GetReplacementMembers + desiredSetMethodName As String) As IList(Of SyntaxNode) Implements IReplacePropertyWithMethodsService.GetReplacementMembers Dim propertyStatement = TryCast(propertyDeclarationNode, PropertyStatementSyntax) If propertyStatement Is Nothing Then - Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode) + Return SpecializedCollections.EmptyList(Of SyntaxNode) End If