Shared\Utilities\AsyncBatchingWorkQueue`1.cs (4)
17Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync,
24Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync,
35private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\Dependencies\Collections\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)
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (26)
31public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer)
36var oldValue = ImmutableSegmentedList<T>.PrivateMarshal.VolatileRead(in location);
39var newValue = transformer(oldValue);
46var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue);
72public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument)
77var oldValue = ImmutableSegmentedList<T>.PrivateMarshal.VolatileRead(in location);
80var newValue = transformer(oldValue, transformerArgument);
87var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue);
103public static ImmutableSegmentedList<T> InterlockedExchange<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value)
105return ImmutableSegmentedList<T>.PrivateMarshal.InterlockedExchange(ref location, value);
117public static ImmutableSegmentedList<T> InterlockedCompareExchange<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value, ImmutableSegmentedList<T> comparand)
119return ImmutableSegmentedList<T>.PrivateMarshal.InterlockedCompareExchange(ref location, value, comparand);
131public static bool InterlockedInitialize<T>(ref ImmutableSegmentedList<T> location, ImmutableSegmentedList<T> value)
133return InterlockedCompareExchange(ref location, value, default(ImmutableSegmentedList<T>)).IsDefault;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\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)