Skip to content

Commit

Permalink
Inline local variable that is only used in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Nov 19, 2014
1 parent 60800d0 commit a4bb44d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ Friend Class NullCheck_CodeRefactoringCodeRefactoringProvider
parameterStmt As ParameterSyntax,
method As MethodBlockSyntax,
cancellationToken As CancellationToken) As Task(Of Document)
Dim _null_ = SyntaxFactory.NothingLiteralExpression(SyntaxFactory.Token(SyntaxKind.NothingKeyword))
Dim _IsExpr_ = SyntaxFactory.IsExpression(
SyntaxFactory.IdentifierName(parameterStmt.Identifier.Identifier.Text),
_null_).WithAdditionalAnnotations(Formatting.Formatter.Annotation)
SyntaxFactory.NothingLiteralExpression(SyntaxFactory.Token(SyntaxKind.NothingKeyword)))
' Note: If I can find the nameof feature in VB.net, then I'll change this line to reflect that
Dim _paramname_ = SyntaxFactory.StringLiteralExpression(
SyntaxFactory.Literal(parameterStmt.Identifier.Identifier.Text))
Expand Down

0 comments on commit a4bb44d

Please sign in to comment.