1 write to NewText
Microsoft.CodeAnalysis (1)
Text\TextChange.cs (1)
47this.NewText = newText;
208 references to NewText
GenerateDocumentationAndConfigFiles (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Metrics (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Metrics.Legacy (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
261properties.Add(NewTextKey, textChange.NewText ?? string.Empty);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
140properties.Add(NewTextKey, textChange.NewText ?? string.Empty);
Microsoft.AspNetCore.App.Analyzers.Test (14)
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (10)
38Assert.Equal("id", change.TextChange.NewText); 66Assert.Equal("id", change.TextChange.NewText); 94Assert.Equal("id", change.TextChange.NewText); 122Assert.Equal("id", change.TextChange.NewText); 152Assert.Equal("id", change.TextChange.NewText); 180Assert.Equal("id", change.TextChange.NewText); 208Assert.Equal("id", change.TextChange.NewText); 236Assert.Equal("id", change.TextChange.NewText); 264Assert.Equal("ids", change.TextChange.NewText); 998Assert.Equal("id", change.TextChange.NewText);
RouteEmbeddedLanguage\RoutePatternCompletionProviderTests.cs (4)
70Assert.Equal("alpha", change.TextChange.NewText); 123Assert.Equal("alpha", change.TextChange.NewText); 152Assert.Equal("alpha", change.TextChange.NewText); 181Assert.Equal("alpha", change.TextChange.NewText);
Microsoft.CodeAnalysis (12)
Text\SourceText.cs (3)
780where !c.Span.IsEmpty || c.NewText?.Length > 0 789var newTextLength = change.NewText?.Length ?? 0; 804var segment = SourceText.From(change.NewText!, this.Encoding, this.ChecksumAlgorithm);
Text\TextChange.cs (8)
55return string.Format("{0}: {{ {1}, \"{2}\" }}", this.GetType().Name, Span, NewText); 67EqualityComparer<string>.Default.Equals(this.NewText, other.NewText); 72return Hash.Combine(this.Span.GetHashCode(), this.NewText?.GetHashCode() ?? 0); 91Debug.Assert(change.NewText is object); 92return new TextChangeRange(change.Span, change.NewText.Length); 102var newTextDisplay = NewText switch 105{ Length: < 10 } => $"\"{NewText}\"",
Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
Microsoft.CodeAnalysis.Analyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.CodeStyle (14)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (10)
62Contract.ThrowIfNull(change.NewText); 64if (change.NewText.Length > 0 && !change.Span.IsEmpty) 69var offset = change.Span.Length - change.NewText.Length; 72if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 81if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 83change = new TextChange(new TextSpan(change.Span.Start + change.NewText.Length, offset), ""); 89Contract.ThrowIfNull(change.NewText); 90if (change.NewText.Length == 0 && change.Span.IsEmpty)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? ""; 145var text = triviaData.GetTextChanges(GetTextSpan(pair)).Single().NewText ?? "";
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
RawStringLiteral\RawStringLiteralCommandHandler_TypeChar.cs (1)
68edit.Insert(textChange.Span.Start, textChange.NewText);
StringCopyPaste\KnownSourcePasteProcessor.cs (1)
169edit.Replace(_selectionSpanBeforePaste.ToSpan(), trivialContentEdit.NewText);
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
174edit.Replace(change.Span.ToSpan(), change.NewText);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (4)
321Assert.Equal($"[*.cs]\r\ndotnet_diagnostic.{id}.severity = error", update.NewText); 344Assert.Equal("[*.cs]\r\ncsharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:error", update.NewText); 357Assert.Equal("[*.cs]\r\ncsharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:error", update.NewText); 377Assert.Equal("[*.cs]\r\ncsharp_new_line_before_else = false", update.NewText);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3153edit.Replace(change.Span.ToSpan(), change.NewText);
Intents\IntentTestsBase.cs (1)
75edit.Replace(change.Span.ToSpan(), change.NewText);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Syntax\SyntaxDiffingTests.cs (16)
34Assert.Equal("class C { }", changes[0].NewText); 54Assert.Equal("B", changes[0].NewText); 76Assert.Equal("C", changes[0].NewText); 78Assert.Equal("D", changes[1].NewText); 96Assert.Equal("class ", changes[0].NewText); 114Assert.Equal("class A ", changes[0].NewText); 133Assert.Equal("class A { }", changes[0].NewText); 153Assert.Equal("} class A { ", changes[0].NewText); 171Assert.Equal("namespace N { ", changes[0].NewText); 189Assert.Equal("int X; ", changes[0].NewText); 206Assert.Equal("", changes[0].NewText); 223Assert.Equal("", changes[0].NewText); 240Assert.Equal("", changes[0].NewText); 258Assert.Equal("struct", changes[0].NewText); 325Assert.Equal("this.", changes[0].NewText); 387Assert.Equal("o", changes[0].NewText);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? ""; 145var text = triviaData.GetTextChanges(GetTextSpan(pair)).Single().NewText ?? "";
Microsoft.CodeAnalysis.EditorFeatures (12)
AutomaticCompletion\BraceCompletionSessionProvider.BraceCompletionSession.cs (1)
456edit.Replace(change.Span.ToSpan(), change.NewText);
Editor\TextEditApplication.cs (1)
42edit.Replace(change.Span.Start, change.Span.Length, change.NewText);
InlineHints\InlineHintDataTag.cs (2)
57if (this.Hint.ReplacementTextChange?.NewText != other.Hint.ReplacementTextChange?.NewText)
InlineHints\InlineHintsTag.cs (1)
283textChange.NewText);
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
345edit.Replace(change.Span.Start, change.Span.Length, change.NewText); 622buffer.Replace(change.Span.ToSpan(), change.NewText);
IntelliSense\AsyncCompletion\CommitManager.cs (2)
274edit.Replace(mappedSpan.Span, change.TextChange.NewText); 300view.TryMoveCaretToAndEnsureVisible(new SnapshotPoint(subjectBuffer.CurrentSnapshot, mappedSpan.Start.Position + textChange.NewText?.Length ?? 0));
Interactive\InteractiveWorkspace.cs (1)
51edit.Replace(change.Span.Start, change.Span.Length, change.NewText);
Shared\Extensions\ITextBufferExtensions.cs (2)
73edit.Replace(change.Span.ToSpan(), change.NewText); 87edit.Replace(change.Span.ToSpan(), change.NewText);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Completion\AbstractCompletionProviderTests.cs (1)
751textChange = new TextChange(textChange.Span, textChange.NewText.TrimEnd(commitChar) + commitChar);
Formatting\CoreFormatterTestsBase.cs (1)
167edit.Replace(change.Span.ToSpan(), change.NewText);
Workspaces\EditorTestHostDocument.cs (1)
219edit.Replace(change.Span.Start, change.Span.Length, change.NewText);
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
213edit.Replace(change.Span.ToSpan(), change.NewText);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (1)
727edits.TextChanges.Do(tc => edit.Replace(tc.Span.ToSpan(), tc.NewText));
Microsoft.CodeAnalysis.Features (20)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
154var delta = textChange.NewText.Length - textChange.Span.Length;
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
113.Select(changes => new TextSpan(changes.Key.Start, changes.Sum(change => change.NewText!.Length)));
Completion\CommonCompletionProvider.cs (1)
84var insertionText = change.NewText;
Completion\Utilities.cs (1)
39var sumOfDeltas = changes.Sum(c => c.NewText!.Length - c.Span.Length);
Copilot\ICopilotChangeAnalysisService.cs (1)
107var newTextLength = change.NewText!.Length;
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
115properties.Add(new(NewTextKey, textChange.NewText!));
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
102properties.Add(KeyValuePair.Create(NewTextKey, textChange.NewText));
Snippets\RoslynLSPSnippetConverter.cs (2)
35var textChangeText = textChange.NewText; 125var textChangeText = textChange.NewText;
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
204var text = change.TextChange.NewText;
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (10)
62Contract.ThrowIfNull(change.NewText); 64if (change.NewText.Length > 0 && !change.Span.IsEmpty) 69var offset = change.Span.Length - change.NewText.Length; 72if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 81if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 83change = new TextChange(new TextSpan(change.Span.Start + change.NewText.Length, offset), ""); 89Contract.ThrowIfNull(change.NewText); 90if (change.NewText.Length == 0 && change.Span.IsEmpty)
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Extensions\ProtocolConversions.cs (3)
345Contract.ThrowIfNull(textChange.NewText); 348NewText = textChange.NewText, 441NewText = textChange.NewText ?? string.Empty
Handler\Completion\CompletionResultFactory.cs (4)
524PopulateTextEdit(lspItem, change.Span, change.NewText ?? string.Empty, documentText, itemDefaultsSupported, defaultSpan); 540if (change.NewText == selectedItem.DisplayText) 545NewText = change.NewText!, 684var newText = completionChange.TextChange.NewText;
Handler\InlineCompletions\InlineCompletionsHandler.cs (2)
187var snippetEndPosition = textChange.Span.Start + textChange.NewText!.Length; 237var amountToAdjust = textChangesBefore.Sum(t => t.NewText!.Length - t.Span.Length);
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
236var newText = textChange.NewText!.Insert(offsetInTextChange, "$0");
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Microsoft.CodeAnalysis.UnitTests (14)
Text\TextChangeTests.cs (14)
274Assert.Equal(expected.NewText, actual.NewText); 687Assert.Equal("Cool ", changes[0].NewText); 743Assert.Equal("ar", changes[0].NewText); 757Assert.Equal(" Bell ", changes[0].NewText); 771Assert.Equal("Cwazy V", changes[0].NewText); 877Assert.Equal("o World", changes[0].NewText); 891Assert.Equal("o", changes[0].NewText); 893Assert.Equal("World", changes[1].NewText); 907Assert.Equal("o", changes[0].NewText); 909Assert.Equal("l", changes[1].NewText); 924Assert.Equal("o World", changes[0].NewText); 942Assert.Equal("o World", changes[0].NewText); 1005editedLength = editedLength - newChange.Span.Length + newChange.NewText.Length;
Microsoft.CodeAnalysis.Workspaces (19)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (1)
75var adjustedChanges = changePartition.Select(c => new TextChange(TextSpan.FromBounds(c.Span.Start - startLineStartPosition, c.Span.End - startLineStartPosition), c.NewText!));
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (13)
169if (change.Span != cumulativeChange.Span || change.NewText != cumulativeChange.NewText) 228mergeConflictResolutionSpans.Add(new TextSpan(commentChangesList[commentChangeIndex].Span.Start + currentPositionDelta, commentChangesList[commentChangeIndex].NewText!.Length)); 229currentPositionDelta += commentChangesList[commentChangeIndex].NewText!.Length - commentChangesList[commentChangeIndex].Span.Length; 237currentPositionDelta += mergedChange.NewText!.Length - mergedChange.Span.Length; 245combinedChanges.Add(new TextChange(conflictingCommentInsertionLocation, commentChangesList[commentChangeIndex].NewText!)); 246mergeConflictResolutionSpans.Add(new TextSpan(commentChangesList[commentChangeIndex].Span.Start + currentPositionDelta, commentChangesList[commentChangeIndex].NewText!.Length)); 247currentPositionDelta += commentChangesList[commentChangeIndex].NewText!.Length; 254currentPositionDelta += mergedChange.NewText!.Length - mergedChange.Span.Length; 261mergeConflictResolutionSpans.Add(new TextSpan(commentChangesList[commentChangeIndex].Span.Start + currentPositionDelta, commentChangesList[commentChangeIndex].NewText!.Length)); 263currentPositionDelta += commentChangesList[commentChangeIndex].NewText!.Length - commentChangesList[commentChangeIndex].Span.Length; 283currentChange = new TextChange(TextSpan.FromBounds(currentChange.Span.Start, nextChange.Span.End), currentChange.NewText + nextChange.NewText);
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Workspace\Host\DocumentService\AbstractSpanMappingService.cs (1)
38var newText = textChanges[i].NewText;
Microsoft.VisualStudio.LanguageServices (4)
Venus\ContainedDocument.cs (4)
330if (!string.IsNullOrWhiteSpace(change.NewText)) 353var rightText = changeInOriginalText.NewText; 745var newText = change.NewText; 820edit.Replace(change.Span.ToSpan(), change.NewText);
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
514edit.Replace(change.Span.Start, change.Span.Length, change.NewText);
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageServer\Handler\OnAutoInsert\OnAutoInsertHandler.cs (2)
55Contract.ThrowIfNull(result.TextChange.NewText); 56var insertText = result.TextChange.NewText;
Roslyn.Diagnostics.Analyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? ""; 145var text = triviaData.GetTextChanges(GetTextSpan(pair)).Single().NewText ?? "";
Test.Utilities (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))
Text.Analyzers (4)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
240var newText = textChange.NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
692var delta = GetLineColumnDelta(0, changes[index].NewText ?? ""); 720if (change.Span.Contains(insertionPoint) && IsNullOrWhitespace(change.NewText))