From 09e5bc831e0b2e313eab42f3e666f0a4309e9c2f Mon Sep 17 00:00:00 2001 From: CyrusNajmabadi Date: Thu, 26 May 2016 17:58:39 -0700 Subject: [PATCH] Inline temps. --- .../CSharpReplacePropertyWithMethodsService.cs | 11 ++++------- .../IReplacePropertyWithMethodsService.cs | 2 +- .../VisualBasicReplacePropertyWithMethods.vb | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs b/src/Features/CSharp/Portable/ReplacePropertyWithMethods/CSharpReplacePropertyWithMethodsService.cs index f2acd26494d..a2c38b001e0 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 742ab76bfca..512cc2f3099 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 2bbf196f2a2..1d2c02dc92d 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 -- GitLab