8 overrides of
Microsoft.CodeAnalysis (6)
Text\ChangedText.cs (1)
133public override char this[int position]
Text\CompositeText.cs (1)
67public override char this[int position]
Text\LargeText.cs (1)
142public override char this[int position]
Text\StringBuilderText.cs (1)
61public override char this[int position]
Text\StringText.cs (1)
56public override char this[int position]
Text\SubText.cs (1)
53public override char this[int position]
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
132public override char this[int position]
Microsoft.CodeAnalysis.Test.Utilities (1)
Syntax\SourceUtilities.cs (1)
25public override char this[int position] => _buffer[position % _buffer.Length];
140 references to
Microsoft.CodeAnalysis (13)
Text\ChangedText.cs (6)
135get { return _newText[position]; } 298if (endsWithCR && _newText[position + delta] == '\n') 311endsWithCR = oldText[change.Span.Start - 1] == '\r'; 315if (endsWithCR && change.Span.Start < oldText.Length && oldText[change.Span.Start] == '\n') 340endsWithCR = text[change.NewLength - 1] == '\r'; 350if (endsWithCR && _newText[position + delta] == '\n')
Text\SubText.cs (1)
62return UnderlyingText[UnderlyingSpan.Start + position];
Text\TextLine.cs (2)
48if (span.Start > 0 && !TextUtilities.IsAnyLineBreakCharacter(text[span.Start - 1])) 56endIncludesLineBreak = TextUtilities.IsAnyLineBreakCharacter(text[span.End - 1]);
Text\TextUtilities.cs (4)
16var c = text[index]; 35return (next < text.Length) && '\n' == text[next] ? 2 : 1; 54char c = text[index]; 57if (index > 0 && text[index - 1] == '\r')
Microsoft.CodeAnalysis.CodeStyle (3)
AbstractVirtualCharService.ITextInfo.cs (1)
23public readonly char Get(SourceText text, int index) => text[index];
TextLineExtensions.cs (2)
53if (!char.IsWhiteSpace(text[i])) 73if (!char.IsWhiteSpace(text[i]))
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
AbstractConflictMarkerCodeFixProvider.cs (3)
154switch (text[position]) 197throw ExceptionUtilities.UnexpectedValue(text[position]); 254if (text[currentLineStart + j] != ch)
Microsoft.CodeAnalysis.CSharp (4)
Parser\Lexer.cs (4)
2420if (position == 0 || SyntaxFacts.IsNewLine(text[position - 1])) 2422var firstCh = text[position]; 2429if (text[position + i] != firstCh) 2441text[position + s_conflictMarkerLength] == ' ';
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
132if (!SyntaxFacts.IsWhitespace(text[i]))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
382if (sourceText[i] != '"') 390if (sourceText[i] != '"')
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
ArrowExpressionClausePlacementCodeFixProvider.cs (3)
89while (end < text.Length && text[end] == ' ') 92if (end < text.Length && SyntaxFacts.IsNewLine(text[end])) 94while (start > 0 && text[start - 1] == ' ')
ConditionalExpressionPlacementCodeFixProvider.cs (3)
91while (end < text.Length && text[end] == ' ') 94if (end < text.Length && SyntaxFacts.IsNewLine(text[end])) 96while (start > 0 && text[start - 1] == ' ')
ConvertNamespaceTransform.cs (1)
150if (indentation[commonIndentation] != text[textLine.Start + commonIndentation])
Microsoft.CodeAnalysis.CSharp.EditorFeatures (14)
StringCopyPaste\StringCopyPasteHelpers.cs (8)
33=> index >= 0 && index < text.Length ? text[index] : '\0'; 111if (!SyntaxFacts.IsWhitespace(text[i])) 205if (text[currentIndex] == character) 208while (endQuoteIndex < contentEnd && text[endQuoteIndex] == character) 535if (commonIndentPrefix[commonPrefixLength] != text[lineWhitespaceSpan.Start + commonPrefixLength]) 554if (spans.First().Length > 0 && text[spans.First().Start] == '"') 557if (spans.Last().Length > 0 && text[spans.Last().End - 1] == '"') 565if (SyntaxFacts.IsNewLine(text[i]))
StringCopyPaste\StringInfo.cs (6)
104while (end > start && text[end - 1] == '"') 134Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawStart])); 149Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawEnd - 1])); 180if (end > start && text[end - 1] == '"') 204while (start < interpolatedString.StringStartToken.Span.End && text[start] == '"') 210while (end > interpolatedString.StringEndToken.Span.Start && text[end - 1] == '"')
Microsoft.CodeAnalysis.CSharp.Features (36)
ArrowExpressionClausePlacementCodeFixProvider.cs (3)
89while (end < text.Length && text[end] == ' ') 92if (end < text.Length && SyntaxFacts.IsNewLine(text[end])) 94while (start > 0 && text[start - 1] == ' ')
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (3)
77if (!char.IsWhiteSpace(text[i])) 228while (startPoint >= 0 && char.IsWhiteSpace(document.Text[startPoint])) 235while (startPoint >= 0 && !char.IsWhiteSpace(document.Text[startPoint]))
BraceCompletion\InterpolatedStringBraceCompletionService.cs (2)
66if (text[start] == '@') 72if (text[start] != '$')
Completion\CompletionProviders\CompletionUtilities.cs (10)
62var ch = text[characterPosition]; 65if (ch == '.' && !(characterPosition >= 1 && text[characterPosition - 1] == '.')) 77if (ch == '>' && characterPosition >= 1 && text[characterPosition - 1] == '-') 83if (ch == ':' && characterPosition >= 1 && text[characterPosition - 1] == ':') 101while (text[characterPosition] == ' ' || 102char.IsLetter(text[characterPosition])) 110return text[characterPosition] == '#'; 121=> IsArgumentListCharacter(text[characterPosition]); 129var ch = text[characterPosition]; 137=> ch == ' ' && (characterPosition == text.Length - 1 || !IsWordStartCharacter(text[characterPosition + 1]));
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
55text[characterPosition] is ' ' or '[' or '(' or '~' ||
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
37=> text[characterPosition] == '.';
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
104=> CompletionUtilities.IsTriggerCharacter(text, characterPosition, options) || text[characterPosition] == ' ';
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (1)
67=> text[insertedCharacterPosition] == '.';
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
78=> text[characterPosition] == ' ' ||
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
52=> text[characterPosition] == ' ' ||
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
167=> CompletionUtilities.IsTriggerCharacter(text, characterPosition, options) || text[characterPosition] == ' ';
Completion\CompletionProviders\SymbolCompletionProvider.cs (2)
148if (!CompletionUtilities.IsArgumentListCharacter(text[characterPosition])) 170if (text[i] != ' ')
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
43=> text[characterPosition] is ('<' or '"') ||
ConditionalExpressionPlacementCodeFixProvider.cs (3)
91while (end < text.Length && text[end] == ' ') 94if (end < text.Length && SyntaxFacts.IsNewLine(text[end])) 96while (start > 0 && text[start - 1] == ' ')
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
132if (!SyntaxFacts.IsWhitespace(text[i]))
ConvertNamespaceTransform.cs (1)
150if (indentation[commonIndentation] != text[textLine.Start + commonIndentation])
Structure\Providers\DisabledTextTriviaStructureProvider.cs (3)
72return endPos >= 2 && text[endPos - 1] == '\n' && text[endPos - 2] == '\r' ? endPos - 2 : 73endPos >= 1 && SyntaxFacts.IsNewLine(text[endPos - 1]) ? endPos - 1 : endPos;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
382if (sourceText[i] != '"') 390if (sourceText[i] != '"')
Microsoft.CodeAnalysis.EditorFeatures (6)
IntelliSense\AsyncCompletion\CompletionSource.cs (4)
204text[caretPoint - 2] != '?' || 651while (current < questionPosition && char.IsWhiteSpace(text[current])) 656if (current < questionPosition && syntaxFacts.IsIdentifierStartCharacter(text[current])) 665while (current < questionPosition && syntaxFacts.IsIdentifierPartCharacter(text[current]))
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (2)
182while (leftSidePosition > 0 && IsTrackableCharacter(syntaxFactsService, beforeText[leftSidePosition - 1])) 187while (rightSidePosition < beforeText.Length && IsTrackableCharacter(syntaxFactsService, beforeText[rightSidePosition]))
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
Snippets\AbstractSnippetCommandHandler.cs (1)
270var c = currentText[startPosition - 1];
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Completion\AbstractCompletionProviderTests.cs (1)
1049var trigger = RoslynCompletion.CompletionTrigger.CreateInsertionTrigger(text[position]);
Microsoft.CodeAnalysis.Features (32)
AbstractConflictMarkerCodeFixProvider.cs (3)
154switch (text[position]) 197throw ExceptionUtilities.UnexpectedValue(text[position]); 254if (text[currentLineStart + j] != ch)
BraceCompletion\AbstractBraceCompletionService.cs (1)
203if (text[index] == openingBrace)
BraceCompletion\IBraceCompletionService.cs (1)
119=> ClosingPoint >= 1 && Document.Text[OpeningPoint] == openingBrace;
BraceMatching\AbstractBraceMatcher.cs (1)
68if (position < text.Length && this.IsBrace(text[position]))
CodeRefactoringHelpers.cs (2)
119while (start < end && char.IsWhiteSpace(sourceText[end - 1])) 124while (start < end && char.IsWhiteSpace(sourceText[start]))
Completion\CommonCompletionUtilities.cs (6)
39while (start > 0 && isWordStartCharacter(text[start - 1])) 53while (end < text.Length && isWordCharacter(text[end])) 64var ch = text[characterPosition]; 73isWordCharacter(text[characterPosition - 1])) 79isWordCharacter(text[characterPosition + 1])) 223if (text[characterPosition] != value[i])
Completion\CompletionService_GetCompletions.cs (1)
208var character = text[caretPosition - 1];
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
276var replacementSpan = TextSpan.FromBounds(text[itemSpan.Start - 1] == '<' && beforeCaretText[0] == '<' ? itemSpan.Start - 1 : itemSpan.Start, itemSpan.End);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (2)
31var ch = text[insertedCharacterPosition]; 40ch = text[insertedCharacterPosition - 1];
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
254if (text[characterPosition] != '.')
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (2)
75if (poundIndex == -1 || text[poundIndex] != '#') 88if (quoteIndex == -1 || text[quoteIndex] != '"')
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
56!char.IsLetter(text[caretPosition - 2]);
EmbeddedLanguages\DateAndTime\EmbeddedCompletionContext.cs (1)
45while (char.IsLetter(text[startPosition - 1]))
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (1)
76=> text[insertedCharacterPosition] == '.';
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (3)
188var currentChar = sourceText[endExclusive]; 198endExclusive + 1 < sourceText.Length && char.IsLetterOrDigit(sourceText[endExclusive + 1])) 211var previousCharacter = sourceText[startInclusive - 1];
Snippets\SnippetUtilities.cs (1)
20var c = currentText[startPosition - 1];
TextUtilities.cs (4)
16var c = text[index]; 35return (next < text.Length) && '\n' == text[next] ? 2 : 1; 54char c = text[index]; 57if (index > 0 && text[index - 1] == '\r')
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
144var triggerCharacter = text[position - 1];
Microsoft.CodeAnalysis.UnitTests (2)
Text\LargeTextTests.cs (2)
66Assert.Throws<IndexOutOfRangeException>(() => text[HelloWorld.Length]); 69Assert.Equal(HelloWorld[i], text[i]);
Microsoft.CodeAnalysis.Workspaces (7)
AbstractVirtualCharService.ITextInfo.cs (1)
23public readonly char Get(SourceText text, int index) => text[index];
Shared\Extensions\SourceTextExtensions.cs (4)
77if (!Match(normalized[j], text[i + j], caseSensitive)) 110if (!Match(normalized[j], text[i + j], caseSensitive)) 138if (text[position + i] != value[i]) 151if (!char.IsWhiteSpace(text[start + i]))
TextLineExtensions.cs (2)
53if (!char.IsWhiteSpace(text[i])) 73if (!char.IsWhiteSpace(text[i]))
Microsoft.VisualStudio.LanguageServices (3)
Venus\ContainedDocument.cs (3)
919if (!char.IsWhiteSpace(text[start])) 930if (!char.IsWhiteSpace(text[end])) 974if (end >= 0 && text[end] == '}')
Microsoft.VisualStudio.LanguageServices.CSharp (2)
LanguageService\CSharpHelpContextService.cs (2)
83while (start > 0 && syntaxFacts.IsIdentifierPartCharacter(text[start - 1])) 86while (end < text.Length - 1 && syntaxFacts.IsIdentifierPartCharacter(text[end]))