提交 8cff6e08 编写于 作者: C Cyrus Najmabadi

Simplify

上级 cbddd3db
......@@ -79,8 +79,7 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
var conditionalExpression = await CreateConditionalExpressionAsync(
document, ifOperation,
trueStatement, falseStatement,
trueAssignment?.Value ?? trueThrow?.Exception,
falseAssignment?.Value ?? falseThrow?.Exception,
trueAssignment?.Value, falseAssignment?.Value,
trueAssignment?.IsRef == true, cancellationToken).ConfigureAwait(false);
// See if we're assigning to a variable declared directly above the if statement. If so,
......
......@@ -67,8 +67,7 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
var conditionalExpression = await CreateConditionalExpressionAsync(
document, ifOperation,
trueStatement, falseStatement,
trueReturn?.ReturnedValue ?? trueThrow?.Exception,
falseReturn?.ReturnedValue ?? falseThrow?.Exception,
trueReturn?.ReturnedValue, falseReturn?.ReturnedValue,
anyReturn.GetRefKind(containingSymbol) != RefKind.None, cancellationToken).ConfigureAwait(false);
var generatorInternal = document.GetRequiredLanguageService<SyntaxGeneratorInternal>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册