提交 4a60f95c 编写于 作者: C Cyrus Najmabadi

Add back null check.

上级 46452e70
......@@ -35,13 +35,14 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
MyBase.New(spans, cancellationToken)
Me._document = document
Me._modifiedSpan = spans.Collapse()
Me._modifiedSpan = modifiedSpan
Me._model = semanticModel
End Sub
Public Shared Async Function CreateAsync(document As Document, spans As IEnumerable(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AddMissingTokensRewriter)
Dim modifiedSpan = spans.Collapse()
Dim semanticModel = Await document.GetSemanticModelForSpanAsync(modifiedSpan, cancellationToken).ConfigureAwait(False)
Dim semanticModel = If(document Is Nothing, Nothing,
Await document.GetSemanticModelForSpanAsync(modifiedSpan, cancellationToken).ConfigureAwait(False))
Return New AddMissingTokensRewriter(document, semanticModel, spans, modifiedSpan, cancellationToken)
End Function
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册