提交 23f324c4 编写于 作者: P Petr Houška

Cleanup.

上级 ae3224a6
......@@ -39,10 +39,6 @@ public override async Task ComputeRefactoringsAsync(CodeRefactoringContext conte
return;
}
var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);
var declaration = await GetDeclarationAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
if (declaration == null)
{
......@@ -51,6 +47,7 @@ public override async Task ComputeRefactoringsAsync(CodeRefactoringContext conte
Debug.Assert(declaration.IsKind(SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression));
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var declaredType = FindAnalyzableType(declaration, semanticModel, cancellationToken);
if (declaredType == null)
{
......@@ -67,6 +64,7 @@ public override async Task ComputeRefactoringsAsync(CodeRefactoringContext conte
return;
}
var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);
var typeStyle = AnalyzeTypeName(declaredType, semanticModel, optionSet, cancellationToken);
if (typeStyle.IsStylePreferred && typeStyle.Severity != ReportDiagnostic.Suppress)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册