13 instantiations of ImmutableSegmentedList
Microsoft.CodeAnalysis.Workspaces (13)
ImmutableSegmentedList`1.cs (6)
74public static readonly ImmutableSegmentedList<T> Empty = new(new SegmentedList<T>()); 146return new ImmutableSegmentedList<T>(list); 175return new ImmutableSegmentedList<T>(list); 207=> new ImmutableSegmentedList<TOutput>(_list.ConvertAll(converter)); 230=> new ImmutableSegmentedList<T>(_list.FindAll(match)); 298return new ImmutableSegmentedList<T>(self._list.GetRange(index, count));
ImmutableSegmentedList`1+PrivateInterlocked.cs (3)
23return new ImmutableSegmentedList<T>(list); 32return new ImmutableSegmentedList<T>(list); 41return new ImmutableSegmentedList<T>(list);
ImmutableSegmentedList`1+ValueBuilder.cs (4)
124=> new ImmutableSegmentedList<TOutput>(ReadOnlyList.ConvertAll(converter)); 142=> new ImmutableSegmentedList<T>(ReadOnlyList.FindAll(match)); 194return new ImmutableSegmentedList<T>(ReadOnlyList.GetRange(index, count)); 325_list = new ImmutableSegmentedList<T>(ReadOnlyList);
188 references to ImmutableSegmentedList
Microsoft.CodeAnalysis.CSharp.Features (1)
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (1)
425private static void AddRange(ImmutableSegmentedList<VirtualChar>.Builder result, VirtualCharSequence sequence)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpVirtualCharService.cs (1)
295private static void ConvertCharactersToRunes(ArrayBuilder<(char ch, TextSpan span)> charResults, ImmutableSegmentedList<VirtualChar>.Builder runeResults)
Microsoft.CodeAnalysis.EditorFeatures (7)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (2)
268private async ValueTask ProcessChangesAsync(ImmutableSegmentedList<ITextSnapshot> snapshots, CancellationToken cancellationToken) 303static ITextSnapshot GetLatest(ImmutableSegmentedList<ITextSnapshot> snapshots)
NavigationBar\NavigationBarController_ModelComputation.cs (1)
25private async ValueTask<NavigationBarModel?> ComputeModelAndSelectItemAsync(ImmutableSegmentedList<bool> unused, CancellationToken cancellationToken)
Remote\SolutionChecksumUpdater.cs (1)
161ImmutableSegmentedList<(Document? oldDocument, Document? newDocument)> values,
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (1)
60private async ValueTask ProcessWorkspaceChangeEventsAsync(ImmutableSegmentedList<WorkspaceChangeEventArgs> events, CancellationToken cancellationToken)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
173private async ValueTask ProcessEventChangeAsync(ImmutableSegmentedList<bool> changes, CancellationToken cancellationToken)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_TagsChanged.cs (1)
46ImmutableSegmentedList<NormalizedSnapshotSpanCollection> snapshotSpans, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (1)
191private ValueTask UpdateUIAsync(ImmutableSegmentedList<UIUpdateRequest> requests, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (6)
Completion\CompletionService.ProviderManager.cs (1)
83private ValueTask ProcessBatchAsync(ImmutableSegmentedList<IReadOnlyList<AnalyzerReference>> referencesList, CancellationToken cancellationToken)
Completion\Providers\CompletionUtilities.cs (1)
28public static ImmutableArray<Project> GetDistinctProjectsFromLatestSolutionSnapshot(ImmutableSegmentedList<Project> projects)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (2)
27private readonly Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> _processBatchAsync; 32Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> processBatchAsync
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
142public static async ValueTask BatchUpdateCacheAsync(ImmutableSegmentedList<Project> projects, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
129public static async ValueTask BatchUpdateCacheAsync(ImmutableSegmentedList<Project> projects, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\References\FindUsagesLSPContext.cs (1)
323private ValueTask ReportReferencesAsync(ImmutableSegmentedList<SumType<VSInternalReferenceItem, LSP.Location>> referencesToReport, CancellationToken cancellationToken)
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (1)
126ImmutableSegmentedList<Uri?> documentUris,
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
93ImmutableSegmentedList<(Document document, ClassificationType type, ClassificationOptions options)> documents,
Microsoft.CodeAnalysis.Workspaces (154)
AbstractVirtualCharService.cs (4)
192protected static int ConvertTextAtIndexToRune(string tokenText, int index, ImmutableSegmentedList<VirtualChar>.Builder result, int offset) 195protected static int ConvertTextAtIndexToRune(SourceText tokenText, int index, ImmutableSegmentedList<VirtualChar>.Builder result, int offset) 199T tokenText, int index, TTextInfo info, ImmutableSegmentedList<VirtualChar>.Builder result, int offset) 232ImmutableSegmentedList<VirtualChar>.Builder result)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
119ImmutableSegmentedList<ProjectId> projectIds, CancellationToken cancellationToken)
ImmutableSegmentedList.cs (15)
14public static ImmutableSegmentedList<T> Create<T>() 15=> ImmutableSegmentedList<T>.Empty; 18public static ImmutableSegmentedList<T> Create<T>(T item) 19=> ImmutableSegmentedList<T>.Empty.Add(item); 22public static ImmutableSegmentedList<T> Create<T>(params T[] items) 23=> ImmutableSegmentedList<T>.Empty.AddRange(items); 26public static ImmutableSegmentedList<T>.Builder CreateBuilder<T>() 27=> ImmutableSegmentedList<T>.Empty.ToBuilder(); 30public static ImmutableSegmentedList<T> CreateRange<T>(IEnumerable<T> items) 31=> ImmutableSegmentedList<T>.Empty.AddRange(items); 34public static ImmutableSegmentedList<T> ToImmutableSegmentedList<T>(this IEnumerable<T> source) 36if (source is ImmutableSegmentedList<T> existingList) 39return ImmutableSegmentedList<T>.Empty.AddRange(source); 43public static ImmutableSegmentedList<T> ToImmutableSegmentedList<T>(this ImmutableSegmentedList<T>.Builder builder)
ImmutableSegmentedList`1.cs (61)
18/// <para>There are different scenarios best for <see cref="ImmutableSegmentedList{T}"/> and others 22/// <see cref="ImmutableSegmentedList{T}"/>:</para> 27/// <description><see cref="ImmutableSegmentedList{T}"/> Complexity</description> 71internal readonly partial struct ImmutableSegmentedList<T> : IImmutableList<T>, IReadOnlyList<T>, IList<T>, IList, IEquatable<ImmutableSegmentedList<T>> 74public static readonly ImmutableSegmentedList<T> Empty = new(new SegmentedList<T>()); 112public static bool operator ==(ImmutableSegmentedList<T> left, ImmutableSegmentedList<T> right) 115public static bool operator !=(ImmutableSegmentedList<T> left, ImmutableSegmentedList<T> right) 118public static bool operator ==(ImmutableSegmentedList<T>? left, ImmutableSegmentedList<T>? right) 121public static bool operator !=(ImmutableSegmentedList<T>? left, ImmutableSegmentedList<T>? right) 127var self = this; 139public ImmutableSegmentedList<T> Add(T value) 141var self = this; 159public ImmutableSegmentedList<T> AddRange(IEnumerable<T> items) 161var self = this; 169if (items is ImmutableSegmentedList<T> immutableList) 171else if (items is ImmutableSegmentedList<T>.Builder builder) 199public ImmutableSegmentedList<T> Clear() 206public ImmutableSegmentedList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) 229public ImmutableSegmentedList<T> FindAll(Predicate<T> match) 255var self = this; 270var self = this; 291public ImmutableSegmentedList<T> GetRange(int index, int count) 293var self = this; 308public ImmutableSegmentedList<T> Insert(int index, T item) 310var self = this; 323public ImmutableSegmentedList<T> InsertRange(int index, IEnumerable<T> items) 325var self = this; 339var self = this; 359public ImmutableSegmentedList<T> Remove(T value) 361var self = this; 371public ImmutableSegmentedList<T> Remove(T value, IEqualityComparer<T>? equalityComparer) 373var self = this; 383public ImmutableSegmentedList<T> RemoveAll(Predicate<T> match) 393public ImmutableSegmentedList<T> RemoveAt(int index) 402public ImmutableSegmentedList<T> RemoveRange(IEnumerable<T> items) 407var self = this; 426public ImmutableSegmentedList<T> RemoveRange(IEnumerable<T> items, IEqualityComparer<T>? equalityComparer) 431var self = this; 450public ImmutableSegmentedList<T> RemoveRange(int index, int count) 452var self = this; 466public ImmutableSegmentedList<T> Replace(T oldValue, T newValue) 468var self = this; 480public ImmutableSegmentedList<T> Replace(T oldValue, T newValue, IEqualityComparer<T>? equalityComparer) 482var self = this; 494public ImmutableSegmentedList<T> Reverse() 496var self = this; 506public ImmutableSegmentedList<T> Reverse(int index, int count) 514public ImmutableSegmentedList<T> SetItem(int index, T value) 523public ImmutableSegmentedList<T> Sort() 525var self = this; 537public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 539var self = this; 551public ImmutableSegmentedList<T> Sort(Comparison<T> comparison) 558var self = this; 570public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer) 590return obj is ImmutableSegmentedList<T> other 594public bool Equals(ImmutableSegmentedList<T> other)
ImmutableSegmentedList`1+Builder.cs (5)
21internal Builder(ImmutableSegmentedList<T> list) 78public ImmutableSegmentedList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) 101public ImmutableSegmentedList<T> FindAll(Predicate<T> match) 141public ImmutableSegmentedList<T> GetRange(int index, int count) 217public ImmutableSegmentedList<T> ToImmutable()
ImmutableSegmentedList`1+PrivateInterlocked.cs (9)
17internal static ImmutableSegmentedList<T> VolatileRead(in ImmutableSegmentedList<T> location) 26internal static ImmutableSegmentedList<T> InterlockedExchange(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value) 35internal static ImmutableSegmentedList<T> InterlockedCompareExchange(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value, ImmutableSegmentedList<T> comparand)
ImmutableSegmentedList`1+ValueBuilder.cs (7)
19private ImmutableSegmentedList<T> _list; 27internal ValueBuilder(ImmutableSegmentedList<T> list) 74var originalList = RoslynImmutableInterlocked.InterlockedExchange(ref _list, default); 123public readonly ImmutableSegmentedList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) 141public readonly ImmutableSegmentedList<T> FindAll(Predicate<T> match) 189public ImmutableSegmentedList<T> GetRange(int index, int count) 323public ImmutableSegmentedList<T> ToImmutable()
ImmutableSegmentedListExtensions.cs (8)
15public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 31public static bool Any<T>(this ImmutableSegmentedList<T> immutableList) 39public static bool Any<T>(this ImmutableSegmentedList<T>.Builder builder) 47public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 63public static T Last<T>(this ImmutableSegmentedList<T> immutableList) 72public static T Last<T>(this ImmutableSegmentedList<T>.Builder builder) 84public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 101public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
J\s\src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs\ImmutableArrayExtensions.cs (1)
960internal static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
RoslynImmutableInterlocked.cs (26)
30public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 35var oldValue = ImmutableSegmentedList<T>.PrivateInterlocked.VolatileRead(in location); 38var newValue = transformer(oldValue); 45var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue); 71public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 76var oldValue = ImmutableSegmentedList<T>.PrivateInterlocked.VolatileRead(in location); 79var newValue = transformer(oldValue, transformerArgument); 86var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue); 102public static ImmutableSegmentedList<T> InterlockedExchange<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value) 104return ImmutableSegmentedList<T>.PrivateInterlocked.InterlockedExchange(ref location, value); 116public static ImmutableSegmentedList<T> InterlockedCompareExchange<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value, ImmutableSegmentedList<T> comparand) 118return ImmutableSegmentedList<T>.PrivateInterlocked.InterlockedCompareExchange(ref location, value, comparand); 130public static bool InterlockedInitialize<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value) 132return InterlockedCompareExchange(ref location, value, default(ImmutableSegmentedList<T>)).IsDefault;
Shared\Utilities\AsyncBatchingWorkQueue`0.cs (1)
26private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
Shared\Utilities\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 32Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 40private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
Shared\Utilities\AsyncBatchingWorkQueue`2.cs (5)
42private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 73private readonly ImmutableSegmentedList<TItem>.Builder _nextBatch = ImmutableSegmentedList.CreateBuilder<TItem>(); 103Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync, 255private (ImmutableSegmentedList<TItem> items, CancellationToken batchCancellationToken) GetNextBatchAndResetQueue() 259var nextBatch = _nextBatch.ToImmutable();
VirtualCharSequence.Chunks.cs (3)
33/// Thin wrapper over an actual <see cref="ImmutableSegmentedList{T}"/>. 39private readonly ImmutableSegmentedList<VirtualChar> _array; 41public ImmutableSegmentedListChunk(ImmutableSegmentedList<VirtualChar> array)
VirtualCharSequence.cs (2)
30public static readonly VirtualCharSequence Empty = Create(ImmutableSegmentedList<VirtualChar>.Empty); 32public static VirtualCharSequence Create(ImmutableSegmentedList<VirtualChar> virtualChars)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
385public async ValueTask ProcessRegularFileChangesAsync(ImmutableSegmentedList<string> filePaths)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1018private async ValueTask ProcessFileChangesAsync(ImmutableSegmentedList<string> filePaths, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices (14)
DesignerAttribute\VisualStudioDesignerAttributeService.cs (2)
137ImmutableSegmentedList<DesignerAttributeData> data, CancellationToken cancellationToken) 152private static void AddFilteredInfos(ImmutableSegmentedList<DesignerAttributeData> data, ArrayBuilder<DesignerAttributeData> filteredData)
DocumentOutline\DocumentOutlineControl_ModelComputation.cs (3)
41private async ValueTask<DocumentSymbolDataModel?> ComputeDataModelAsync(ImmutableSegmentedList<bool> _, CancellationToken cancellationToken) 115private async ValueTask<DocumentSymbolDataModel?> FilterAndSortDataModelAsync(ImmutableSegmentedList<bool> _, CancellationToken cancellationToken) 154private async ValueTask HighlightExpandAndPresentItemsAsync(ImmutableSegmentedList<ExpansionOption> expansionOption, CancellationToken cancellationToken)
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (1)
464private ValueTask UpdateTableProgressAsync(ImmutableSegmentedList<(int current, int maximum)> nextBatch, CancellationToken _)
LanguageService\AbstractCreateServicesOnTextViewConnection.cs (1)
76private async ValueTask BatchProcessProjectsWithOpenedDocumentAsync(ImmutableSegmentedList<ProjectId?> projectIds, CancellationToken cancellationToken)
Packaging\PackageInstallerServiceFactory.cs (3)
458ImmutableSegmentedList<(bool solutionChanged, ProjectId? changedProject)> workQueue, CancellationToken cancellationToken) 473ImmutableSegmentedList<(bool solutionChanged, ProjectId? changedProject)> workQueue, CancellationToken cancellationToken) 522ImmutableSegmentedList<(bool solutionChanged, ProjectId? changedProject)> workQueue, Solution solution, HashSet<ProjectId> projectsToProcess)
PdbSourceDocument\PdbSourceDocumentOutputWindowLogger.cs (1)
50private async ValueTask ProcessLogMessagesAsync(ImmutableSegmentedList<string?> messages, CancellationToken cancellationToken)
ProjectSystem\FileChangeWatcher.cs (1)
56private async ValueTask ProcessBatchAsync(ImmutableSegmentedList<WatcherOperation> workItems, CancellationToken cancellationToken)
TaskList\VisualStudioTaskListService.cs (2)
193ImmutableSegmentedList<(DocumentId documentId, ImmutableArray<TaskListItem> items)> docAndCommentsArray, CancellationToken cancellationToken) 228ImmutableSegmentedList<(DocumentId documentId, ImmutableArray<TaskListItem> items)> array,
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\ProjectCodeModelFactory.cs (1)
79ImmutableSegmentedList<DocumentId> documentIds, CancellationToken cancellationToken)