2 instantiations of VirtualCharSequence
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
87=> new(_leafCharacters, new TextSpan(_span.Start + span.Start, span.Length)); 209return new VirtualCharSequence(
76 references to VirtualCharSequence
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\StringCopyPasteData.cs (2)
95var virtualChars = virtualCharService.TryConvertToVirtualChars(token); 117var subsequence = virtualChars.GetSubSequence(TextSpan.FromBounds(firstCharIndexInclusive, lastCharIndexInclusive + 1));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
136var allChars = _service.TryConvertToVirtualChars(token);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
113var allChars = _service.TryConvertToVirtualChars(token);
Microsoft.CodeAnalysis.CSharp.Features (9)
ConvertBetweenRegularAndVerbatimString\AbstractConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (3)
104var chars = charService.TryConvertToVirtualChars(stringToken); 136var chars = charService.TryConvertToVirtualChars(stringToken); 161var chars = charService.TryConvertToVirtualChars(subToken);
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (3)
55var characters = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(token); 144var characters = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(token); 359var result = characters.GetSubSequence(TextSpan.FromBounds(index, end));
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (3)
45var virtualCharsWithMarkup = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(token); 133/// Takes a <see cref="VirtualCharSequence"/> and returns the same characters from it, without any characters 272/// cref="VirtualCharSequence"/>.
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (2)
76var virtualChars = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(token); 125var virtualChars = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(skippedTrivia.Token);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameParserTests.Utilities.cs (1)
95var textSeq = VirtualCharSequence.Create(0, originalText);
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (13)
EmbeddedLanguages\AspNetCoreVirtualCharSequence.cs (13)
14/// <inheritdoc cref="VirtualCharSequence"/> 24/// <inheritdoc cref="VirtualCharSequence.Empty"/> 27/// <inheritdoc cref="VirtualCharSequence.IsDefault"/> 30/// <inheritdoc cref="VirtualCharSequence.Length"/> 33/// <inheritdoc cref="VirtualCharSequence.this"/> 36/// <inheritdoc cref="VirtualCharSequence.GetSubSequence"/> 39/// <inheritdoc cref="VirtualCharSequence.Find"/> 42/// <inheritdoc cref="VirtualCharSequence.CreateString"/> 45/// <inheritdoc cref="VirtualCharSequence.FromBounds"/> 50/// <inheritdoc cref="VirtualCharSequence.IndexOf"/> 54/// <inheritdoc cref="VirtualCharSequence.Contains"/> 58/// <inheritdoc cref="VirtualCharSequence.GetEnumerator"/> 62/// <inheritdoc cref="VirtualCharSequence.Enumerator"/>
Microsoft.CodeAnalysis.Features (11)
EmbeddedLanguages\Classification\AbstractFallbackEmbeddedLanguageClassifier.cs (1)
37var virtualChars = _info.VirtualCharService.TryConvertToVirtualChars(token);
EmbeddedLanguages\Json\JsonLexer.cs (1)
190var chars = this.Text.GetSubSequence(new TextSpan(Position, 1));
EmbeddedLanguages\Json\JsonParser.cs (1)
531var chars = token.VirtualChars;
EmbeddedLanguages\Json\JsonParser.JsonNetSyntaxChecks.cs (1)
67var chars = numberToken.VirtualChars;
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (1)
226var chars = literalToken.VirtualChars;
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
86var chars = _info.VirtualCharService.TryConvertToVirtualChars(token);
EmbeddedLanguages\StackFrame\StackFrameParser.cs (2)
63/// Constructs a <see cref="VirtualCharSequence"/> and calls <see cref="TryParse(VirtualCharSequence)"/>
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
185var sequence = virtualCharService.TryConvertToVirtualChars(formatToken);
StackTraceExplorer\StackTraceAnalyzer.cs (1)
42var sequence = VirtualCharSequence.Create(0, callstack);
StackTraceExplorer\VSDebugCallstackParser.cs (1)
38var textToParse = line.GetSubSequence(TextSpan.FromBounds(startPoint, line.Length));
Microsoft.CodeAnalysis.Workspaces (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxHelpers.cs (1)
15public static TextSpan GetSpan(VirtualCharSequence virtualChars)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (3)
19public readonly VirtualCharSequence VirtualChars; 32VirtualCharSequence virtualChars, 59Optional<VirtualCharSequence> virtualChars = default,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxTree.cs (2)
15public readonly VirtualCharSequence Text; 20VirtualCharSequence text,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxTrivia.cs (2)
18public readonly VirtualCharSequence VirtualChars; 26public EmbeddedSyntaxTrivia(TSyntaxKind kind, VirtualCharSequence virtualChars, ImmutableArray<EmbeddedDiagnostic> diagnostics)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (9)
21protected abstract VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token); 48public VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token) 58var result = TryConvertToVirtualCharsWorker(token); 65private void CheckInvariants(SyntaxToken token, VirtualCharSequence result) 133protected static VirtualCharSequence TryConvertSimpleDoubleQuoteString( 229protected static VirtualCharSequence CreateVirtualCharSequence( 241var sequence = VirtualCharSequence.Create(offset, tokenText); 245return VirtualCharSequence.Create(result.ToImmutable());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\IVirtualCharService.cs (1)
62VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.Chunks.cs (1)
78/// do not want that should then ask for an appropriate <see cref="VirtualCharSequence.GetSubSequence"/>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (16)
30public static readonly VirtualCharSequence Empty = Create(ImmutableSegmentedList<VirtualChar>.Empty); 32public static VirtualCharSequence Create(ImmutableSegmentedList<VirtualChar> virtualChars) 35public static VirtualCharSequence Create(int firstVirtualCharPosition, string underlyingData) 39/// The actual characters that this <see cref="VirtualCharSequence"/> is a portion of. 67/// Gets the number of elements contained in the <see cref="VirtualCharSequence"/>. 77/// Gets a value indicating whether the <see cref="VirtualCharSequence"/> was declared but not initialized. 84/// Retreives a sub-sequence from this <see cref="VirtualCharSequence"/>. 86public VirtualCharSequence GetSubSequence(TextSpan span) 164public VirtualCharSequence Skip(int count) 167public VirtualCharSequence SkipWhile(Func<VirtualChar, bool> predicate) 182/// Create a <see cref="string"/> from the <see cref="VirtualCharSequence"/>. 194public void AssertAdjacentTo(VirtualCharSequence virtualChars) 201/// Combines two <see cref="VirtualCharSequence"/>s, producing a final 205public static VirtualCharSequence FromBounds( 206VirtualCharSequence chars1, VirtualCharSequence chars2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.Enumerator.cs (1)
13public struct Enumerator(VirtualCharSequence virtualCharSequence) : IEnumerator<VirtualChar>