62 writes to Character
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\ProtocolConversions.cs (1)
385=> new() { Line = linePosition.Line, Character = linePosition.Character };
Extensions\ProtocolConversions.Diagnostics.cs (2)
163Character = dataLocation.UnmappedFileSpan.StartLinePosition.Character, 168Character = dataLocation.UnmappedFileSpan.EndLinePosition.Character,
Handler\CodeActions\CodeActionResolveHelper.cs (2)
258var emptyDocumentRange = new LSP.Range { Start = new Position { Line = 0, Character = 0 }, End = new Position { Line = 0, Character = 0 } };
Protocol\Position.cs (1)
32this.Character = character;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (55)
CodeActions\CodeActionResolveTests.cs (30)
48applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 8 }, End = new Position { Line = 4, Character = 11 } }, 72applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 8 }, End = new Position { Line = 4, Character = 11 } }, 103applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 8 }, End = new Position { Line = 4, Character = 11 } }, 135applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 8 }, End = new Position { Line = 4, Character = 11 } }, 178applicableRange: new LSP.Range { Start = new Position { Line = 0, Character = 6 }, End = new Position { Line = 0, Character = 9 } }, 199applicableRange: new LSP.Range { Start = new Position { Line = 0, Character = 6 }, End = new Position { Line = 0, Character = 9 } }, 237applicableRange: new LSP.Range { Start = new Position { Line = 2, Character = 33 }, End = new Position { Line = 39, Character = 2 } }, 296applicableRange: new LSP.Range { Start = new Position { Line = 0, Character = 6 }, End = new Position { Line = 0, Character = 9 } }, 324Character = 0, 329Character = 0 354Character = 0, 359Character = 0 378applicableRange: new LSP.Range { Start = new Position { Line = 0, Character = 6 }, End = new Position { Line = 0, Character = 9 } }, 424applicableRange: new LSP.Range { Start = new Position { Line = 3, Character = 6 }, End = new Position { Line = 3, Character = 9 } }, 455Character = 0, 460Character = 0 484Character = 0, 489Character = 1 508applicableRange: new LSP.Range { Start = new Position { Line = 3, Character = 6 }, End = new Position { Line = 3, Character = 9 } },
CodeActions\CodeActionsTests.cs (4)
51applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 8 }, End = new Position { Line = 4, Character = 11 } }, 87applicableRange: new LSP.Range { Start = new Position { Line = 4, Character = 12 }, End = new Position { Line = 4, Character = 12 } },
Completion\CompletionTests.cs (6)
558Start = new LSP.Position { Line = 5, Character = 19 }, 559End = new LSP.Position { Line = 5, Character = 19 } 597Start = new LSP.Position { Line = 5, Character = 21 }, 598End = new LSP.Position { Line = 5, Character = 21 } 636Start = new LSP.Position { Line = 5, Character = 25 }, 637End = new LSP.Position { Line = 5, Character = 25 }
DataTips\DataTipRangeHandlerTests.cs (4)
51Start = new LSP.Position { Line = 3, Character = 8 }, 52End = new LSP.Position { Line = 3, Character = 19 }, 56Start = new LSP.Position { Line = 3, Character = 8 }, 57End = new LSP.Position { Line = 3, Character = 38 },
Definitions\GoToDefinitionTests.cs (1)
101var position = new LSP.Position { Line = 5, Character = 18 };
Diagnostics\PullDiagnosticTests.cs (5)
354Assert.Equal(new Position { Line = 0, Character = 9 }, results[0].Diagnostics!.Single().Range.Start); 363Assert.Equal(new Position { Line = 0, Character = 10 }, results[0].Diagnostics!.Single().Range.Start); 1711Assert.Equal(new Position { Line = 0, Character = 9 }, results[0].Diagnostics!.Single().Range.Start); 1724Assert.Equal(new Position { Line = 0, Character = 10 }, results2[0].Diagnostics!.Single().Range.Start); 1744Assert.Equal(new Position { Line = 0, Character = 9 }, results[0].Diagnostics!.Single().Range.Start);
Metadata\LspMetadataAsSourceWorkspaceTests.cs (2)
107Start = new LSP.Position { Line = 4, Character = 40 }, 108End = new LSP.Position { Line = 4, Character = 40 }
References\FindImplementationsTests.cs (1)
96var position = new LSP.Position { Line = 2, Character = 9 };
Rename\RenameTests.cs (2)
173var startPosition = new LSP.Position { Line = 2, Character = 9 }; 174var endPosition = new LSP.Position { Line = 2, Character = 10 };
Microsoft.CodeAnalysis.Remote.Razor (1)
Diagnostics\RemoteDiagnosticsService.cs (1)
98diagnostic.Range.Start.Character = 0;
78 references to Character
IdeBenchmarks (1)
Lsp\LspSourceGeneratorBenchmarks.cs (1)
100var typingColumn = typingLocation.Range.Start.Character;
Microsoft.CodeAnalysis.LanguageServer (1)
LanguageServer\Handler\CopilotCompletion\CopilotCompletionResolveContextHandler.cs (1)
34var linePosition = new LinePosition(param.DocumentContext.Position.Line, param.DocumentContext.Position.Character);
Microsoft.CodeAnalysis.LanguageServer.Protocol (13)
Extensions\Extensions.cs (4)
310if (p1.Character > p2.Character) 312else if (p1.Character < p2.Character)
Extensions\ProtocolConversions.cs (2)
320=> new(position.Line, position.Character); 365=> $"{{ Line={position.Line}, Character={position.Character} }}";
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (4)
116breakpointRange.End.Character - breakpointRange.Start.Character < existingRange.End.Character - existingRange.Start.Character);
Protocol\Position.cs (3)
107this.Character == other.Character; 116return this.Line ^ this.Character;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (21)
Completion\CompletionFeaturesTests.cs (4)
359await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 814await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "i")); 868await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 1111await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "f"));
Completion\CompletionTests.cs (9)
1052await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "a")); 1120await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "C")); 1189await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "ask")); 1201await testLspServer.DeleteTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, caretLocation.Range.End.Line, caretLocation.Range.End.Character + 3)); 1214await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "i")); 1415await testLspServer.InsertTextAsync(secondCaretLocation.DocumentUri, (secondCaretLocation.Range.End.Line, secondCaretLocation.Range.End.Character, "S")); 1430await testLspServer.InsertTextAsync(firstCaretLocation.DocumentUri, (firstCaretLocation.Range.End.Line, firstCaretLocation.Range.End.Character, "a")); 1532await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "z"));
FoldingRanges\FoldingRangesTests.cs (2)
181StartCharacter = lineFoldingOnly ? null : range.Start.Character, 182EndCharacter = lineFoldingOnly ? null : range.End.Character,
SelectionRanges\SelectionRangesTests.cs (4)
248var outerStart = (outer.Start.Line, outer.Start.Character); 249var outerEnd = (outer.End.Line, outer.End.Character); 250var innerStart = (inner.Start.Line, inner.Start.Character); 251var innerEnd = (inner.End.Line, inner.End.Character);
Symbols\DocumentSymbolsTests.Hierarchical.cs (2)
827return a.Line < b.Line || (a.Line == b.Line && a.Character <= b.Character);
Microsoft.CodeAnalysis.Razor.Workspaces (33)
AutoInsert\AutoClosingTagOnAutoInsertProvider.cs (1)
80var edit = LspFactory.CreateTextEdit(position.Line, position.Character - 1, insertionText);
CodeActions\CSharp\TypeAccessibilityCodeActionProvider.cs (1)
90end.Character > context.SourceText.Lines[end.Line].End)
Completion\Delegation\DelegatedCompletionHelper.cs (2)
175if (originalPositionInfo.Position.Character == 0) 198previousPosition.Character + 1),
Completion\Delegation\TextEditResponseRewriter.cs (3)
77var offset = projectedPosition.Character - hostDocumentPosition.Character; 86var translatedCharacter = editPosition.Character - offset;
Extensions\LspExtensions_Position.cs (5)
11=> (line, character) = (position.Line, position.Character); 14=> new(position.Line, position.Character); 22return result != 0 ? result : position.Character.CompareTo(other.Character); 26=> $"({position.Line}, {position.Character})";
Extensions\LspExtensions_Range.cs (6)
25=> (startLine, startCharacter, endLine, endCharacter) = (range.Start.Line, range.Start.Character, range.End.Line, range.End.Character); 46range.End.Line < other.Start.Line || (range.End.Line == other.Start.Line && range.End.Character < other.Start.Character); 49other.End.Line < range.Start.Line || (other.End.Line == range.Start.Line && other.End.Character < range.Start.Character);
Extensions\LspExtensions_SourceText.cs (6)
31=> text.IsValidPosition(position.Line, position.Character); 34=> text.TryGetAbsoluteIndex(position.Line, position.Character, out absoluteIndex); 37=> text.GetRequiredAbsoluteIndex(position.Line, position.Character); 40=> text.GetTextSpan(range.Start.Line, range.Start.Character, range.End.Line, range.End.Character); 43=> text.TryGetSourceLocation(position.Line, position.Character, out location);
Extensions\LspFactory.cs (7)
41defaultPosition.Character == 0, 61defaultRange.Start.Character == 0 && 63defaultRange.End.Character == 0, 79undefinedPosition.Character == -1, 95undefinedRange.Start.Character == -1 && 97undefinedRange.End.Character == -1, 156=> CreateRange(start, CreatePosition(start.Line, start.Character + length));
Formatting\Passes\RazorFormattingPass.cs (2)
428directiveNode.GetRange(source).Start.Character < closeBraceRange.Start.Character) 434directiveNode.GetRange(source).Start.Character, context.Options.InsertSpaces, context.Options.TabSize);
Microsoft.CodeAnalysis.Remote.Razor (3)
Diagnostics\RemoteDiagnosticsService.cs (2)
82var absoluteIndex = sourceText.GetRequiredAbsoluteIndex(diagnostic.Range.Start.Line, diagnostic.Range.Start.Character); 96if (diagnostic.Range.Start.Character > 0)
SignatureHelp\RemoteSignatureHelpService.cs (1)
35var linePosition = new LinePosition(position.Line, position.Character);
Microsoft.VisualStudio.LanguageServices (2)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (2)
93var originalStartPosition = textSnapshot.GetLineFromLineNumber(symbolRange.Start.Line).Start.Position + symbolRange.Start.Character; 94var originalEndPosition = textSnapshot.GetLineFromLineNumber(symbolRange.End.Line).Start.Position + symbolRange.End.Character;
Microsoft.VisualStudio.LanguageServices.Razor (2)
RazorLanguageService_IVsLanguageDebugInfo.cs (2)
156iStartIndex = breakpointRange.Start.Character, 158iEndIndex = breakpointRange.End.Character,
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (1)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostInlayHintEndpointTest.cs (1)
265.ThenByDescending(e => e.Range.Start.Character)
Microsoft.VisualStudioCode.RazorExtension.UnitTests (1)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostInlayHintEndpointTest.cs (1)
265.ThenByDescending(e => e.Range.Start.Character)