142 references to Character
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
185CharacterNumber = linePosSpan.StartLinePosition.Character + 1;
Microsoft.AspNetCore.Analyzer.Testing (3)
Assert.cs (3)
29if (actualLinePosition.Character > 0) 31if (actualLinePosition.Character + 1 != expected.Column) 36$"Expected diagnostic to start at column \"{expected.Column}\" was actually on column \"{actualLinePosition.Character + 1}\"");
Microsoft.AspNetCore.Components.Analyzers.Tests (4)
Verifiers\DiagnosticVerifier.cs (4)
216if (actualLinePosition.Character > 0) 218if (actualLinePosition.Character + 1 != expected.Column) 224expected.Column, actualLinePosition.Character + 1, FormatDiagnostics(analyzer, diagnostic))); 269linePosition.Character + 1,
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (4)
Verifiers\DiagnosticVerifier.cs (4)
216if (actualLinePosition.Character > 0) 218if (actualLinePosition.Character + 1 != expected.Column) 224expected.Column, actualLinePosition.Character + 1, FormatDiagnostics(analyzer, diagnostic))); 269linePosition.Character + 1,
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
168return (filePath, lineSpan.StartLinePosition.Line + 1, lineSpan.StartLinePosition.Character + 1);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CompilationFailedExceptionFactory.cs (2)
125mappedLineSpan.StartLinePosition.Character + 1, 127mappedLineSpan.EndLinePosition.Character + 1);
Microsoft.CodeAnalysis (20)
CodeGen\SequencePointList.cs (2)
179int startColumn = fileLinePositionSpan.StartLinePosition.Character + 1; 180int endColumn = fileLinePositionSpan.EndLinePosition.Character + 1;
CommandLine\SarifErrorLogger.cs (2)
51_writer.Write("startColumn", span.StartLinePosition.Character + 1); 53_writer.Write("endColumn", span.EndLinePosition.Character + 1);
Diagnostic\DiagnosticFormatter.cs (1)
79return string.Format("({0},{1})", span.Start.Line + 1, span.Start.Character + 1);
Diagnostic\Location.cs (2)
115result += "(" + pos.Path + "@" + (pos.StartLinePosition.Line + 1) + ":" + (pos.StartLinePosition.Character + 1) + ")"; 144result += "(" + pos.Path + "@" + (pos.StartLinePosition.Line + 1) + ":" + (pos.StartLinePosition.Character + 1) + ")";
Syntax\LineDirectiveMap.cs (6)
74return (mappedLine == -1) ? new LinePosition(unmapped.Character) : new LinePosition(mappedLine, unmapped.Character); 84unmappedStartPos.Character < entry.UnmappedCharacterOffset.GetValueOrDefault()) 98entry.MappedSpan.Start.Character + unmapped.Character - entry.UnmappedCharacterOffset.GetValueOrDefault() : 99unmapped.Character);
Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
Text\LinePosition.cs (5)
107return other.Line == this.Line && other.Character == this.Character; 124return Hash.Combine(Line, Character); 133return Line + "," + Character; 139return (result != 0) ? result : _character.CompareTo(other.Character);
Text\TextLineCollection.cs (1)
70return this[position.Line].Start + position.Character;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
Microsoft.CodeAnalysis.CSharp (9)
CommandLine\CommandLineDiagnosticFormatter.cs (3)
34span.Start.Character + 1, 36span.End.Character + 1); 42span.Start.Character + 1);
Emitter\Model\PEModuleBuilder.cs (2)
462span.StartLinePosition.Character, 464span.EndLinePosition.Character));
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
510span.StartLinePosition.Character, 512span.EndLinePosition.Character));
Parser\Blender.cs (1)
151var column = oldTree.SyntaxTree.GetLineSpan(new TextSpan(start, 0)).Span.Start.Character;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1321diagnostics.Add(ErrorCode.ERR_InterceptorMustReferToStartOfTokenPosition, attributeLocation, referencedToken.Text, linePositionZeroBased.Line + 1, linePositionZeroBased.Character + 1);
Microsoft.CodeAnalysis.CSharp.Features (1)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
175var offsetOfBasePosition = baseLinePosition.Character;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (15)
Diagnostics\LineSpanDirectiveTests.cs (1)
501return Math.Min(line.Start + position.Character, line.End);
Diagnostics\LocationsTests.cs (14)
61Assert.Equal(expectedStartOffset, mappedSpan.StartLinePosition.Character); 63Assert.Equal(expectedEndOffset, mappedSpan.EndLinePosition.Character); 97Assert.Equal(4, flpsX.StartLinePosition.Character); 99Assert.Equal(6, flpsX.EndLinePosition.Character); 104Assert.Equal(4, flpsX.StartLinePosition.Character); 106Assert.Equal(6, flpsX.EndLinePosition.Character); 111Assert.Equal(4, flpsXToCloseBrace.StartLinePosition.Character); 113Assert.Equal(1, flpsXToCloseBrace.EndLinePosition.Character); 118Assert.Equal(4, flpsXToCloseBrace.StartLinePosition.Character); 120Assert.Equal(1, flpsXToCloseBrace.EndLinePosition.Character); 574Assert.Equal(5, lineSpan.StartLinePosition.Character); 576Assert.Equal(5, lineSpan.EndLinePosition.Character); 602Assert.Equal(0, lineSpan.StartLinePosition.Character); 604Assert.Equal(0, lineSpan.EndLinePosition.Character);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
DiagnosticTestUtilities.cs (1)
120Column = lineSpan.IsValid ? lineSpan.StartLinePosition.Character + 1 : 0,
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Shared\Extensions\ITextSnapshotExtensions.cs (2)
36GetPosition(snapshot, span.Start.Line, span.Start.Character), 37GetPosition(snapshot, span.End.Line, span.End.Character));
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
Peek\PeekHelpers.cs (4)
20var label = string.Format("{0} - ({1}, {2})", fileName, identifierLocation.Start.Line + 1, identifierLocation.Start.Character + 1); 39startIndex: entityOfInterestSpan.Start.Character, 41endIndex: entityOfInterestSpan.End.Character, 43idIndex: identifierLocation.Start.Character,
Microsoft.CodeAnalysis.Features (17)
CodeLens\CodeLensReferencesService.cs (1)
157startLinePosition.Character,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2179if (oldMappedSpan.Span.Start.Character != newMappedSpan.Span.Start.Character)
EditAndContinue\ActiveStatementsMap.cs (10)
262? unmappedSection.Start.Character + mappedSpan.Start.Character - mappedSection.Start.Character 263: mappedSpan.Start.Character; 266? unmappedSection.Start.Character + mappedSpan.End.Character - mappedSection.Start.Character 267: mappedSpan.End.Character; 280var start = lines[lineSpan.Start.Line].Start + lineSpan.Start.Character; 281var end = lines[lineSpan.End.Line].Start + lineSpan.End.Character;
EditAndContinue\Utilities\Extensions.cs (4)
19=> new(new LinePosition(span.Start.Line + lineDelta, span.Start.Character), new LinePosition(span.End.Line + lineDelta, span.End.Character)); 34=> new(span.Start.Line, span.Start.Character, span.End.Line, span.End.Character);
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Extensions\ProtocolConversions.cs (1)
344=> new LSP.Position { Line = linePosition.Line, Character = linePosition.Character };
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
120writer.WriteInt32(position.Character);
Handler\FoldingRanges\FoldingRangesHandler.cs (2)
120StartCharacter = linePositionSpan.Start.Character, 122EndCharacter = linePositionSpan.End.Character,
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
216var amountToIndent = desiredCaretLinePosition.Character - lineToIndent.Span.Length;
Handler\SemanticTokens\SemanticTokensHelpers.cs (2)
304var deltaStartCharacter = linePosition.Character; 311lastStartCharacter = linePosition.Character;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
226await testLspServer.InsertTextAsync(document.GetURI(), (lineInfo.Start.Line, lineInfo.Start.Character, text));
SpellCheck\SpellCheckTests.cs (1)
653await testLspServer.InsertTextAsync(document.GetURI(), (lineInfo.Start.Line, lineInfo.Start.Character, text));
Microsoft.CodeAnalysis.Test.Utilities (12)
Diagnostics\CommonDiagnosticAnalyzers.cs (8)
126""startColumn"": " + (expectedLineSpan.StartLinePosition.Character + 1) + @", 128""endColumn"": " + (expectedLineSpan.EndLinePosition.Character + 1) + @" 203""startColumn"": " + (expectedLineSpan.StartLinePosition.Character + 1) + @", 205""endColumn"": " + (expectedLineSpan.EndLinePosition.Character + 1) + @" 286""startColumn"": " + (expectedLineSpan.StartLinePosition.Character + 1) + @", 288""endColumn"": " + (expectedLineSpan.EndLinePosition.Character + 1) + @" 344""startColumn"": " + (expectedLineSpan.StartLinePosition.Character + 1) + @", 346""endColumn"": " + (expectedLineSpan.EndLinePosition.Character + 1) + @"
Diagnostics\DiagnosticDescription.cs (4)
241public int LocationCharacter => _startPosition.Value.Character + 1; 438sb.Append(_startPosition.Value.Character + 1); 656return x.Value.Character.CompareTo(y.Value.Character);
Microsoft.CodeAnalysis.UnitTests (3)
LinePositionTests.cs (1)
47Assert.Equal(13, lp.Character);
Text\LargeTextTests.cs (1)
176Assert.Equal(p - start, text.Lines.GetLinePosition(p).Character);
Text\StringTextTest.cs (1)
129Assert.Equal(p - start, text.Lines.GetLinePosition(p).Character);
Microsoft.CodeAnalysis.VisualBasic (4)
Emit\PEModuleBuilder.vb (2)
288span.StartLinePosition.Character, 290span.EndLinePosition.Character))
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (2)
463span.StartLinePosition.Character, 465span.EndLinePosition.Character))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (10)
SymbolsTests\Source\TypeTests.vb (10)
463Assert.Equal(16, span.StartLinePosition.Character) 464Assert.Equal(25, span.EndLinePosition.Character) 499Assert.Equal(12, span.StartLinePosition.Character) 500Assert.Equal(21, span.EndLinePosition.Character) 513Assert.Equal(15, span.StartLinePosition.Character) 514Assert.Equal(18, span.EndLinePosition.Character) 520Assert.Equal(22, span.StartLinePosition.Character) 521Assert.Equal(25, span.EndLinePosition.Character) 527Assert.Equal(32, span.StartLinePosition.Character) 528Assert.Equal(35, span.EndLinePosition.Character)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
LocationTests.vb (2)
49Assert.Equal(expectedStartOffset, mappedSpan.StartLinePosition.Character) 51Assert.Equal(expectedEndOffset, mappedSpan.EndLinePosition.Character)
Microsoft.CodeAnalysis.Workspaces (3)
Shared\Extensions\FileLinePositionSpanExtensions.cs (2)
48var startColumn = Math.Max(span.Start.Character, 0); 49var endColumn = Math.Max(span.End.Character, 0);
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingInvocationDescription.cs (1)
29 return new InterceptorLocation(FilePath, LineSpan.Start.Line + 1, LineSpan.Start.Character + 1);
Microsoft.VisualStudio.LanguageServices (13)
CallHierarchy\CallHierarchyDetail.cs (2)
33EndColumn = location.GetLineSpan().Span.End.Character; 36StartColumn = location.GetLineSpan().StartLinePosition.Character;
Diagnostics\VisualStudioVenusSpanMappingService.cs (7)
104if (!TryAdjustSpanIfNeededForVenus(documentId, originalLineInfo.StartLinePosition.Line, originalLineInfo.StartLinePosition.Character, out var startLineColumn)) 107startLineColumn = new MappedSpan(originalLineInfo.StartLinePosition.Line, originalLineInfo.StartLinePosition.Character, mappedLineInfo.StartLinePosition.Line, mappedLineInfo.StartLinePosition.Character); 111if (!TryAdjustSpanIfNeededForVenus(documentId, originalLineInfo.EndLinePosition.Line, originalLineInfo.EndLinePosition.Character, out var endLineColumn)) 114endLineColumn = new MappedSpan(originalLineInfo.EndLinePosition.Line, originalLineInfo.EndLinePosition.Character, mappedLineInfo.EndLinePosition.Line, mappedLineInfo.EndLinePosition.Character); 218return TryAdjustSpanIfNeededForVenus(documentId, adjustedPosition.Line, adjustedPosition.Character, out mappedSpan);
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (1)
53var formatted = $"{filePath} - ({linePosition.Line + 1}, {linePosition.Character + 1}) : {sourceLine}";
Progression\GraphBuilder.cs (2)
791new Position(span.Start.Line, span.Start.Character), 792new Position(span.End.Line, span.End.Character));
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
65span.StartLinePosition.Character + 1,