13 instantiations of ImmutableSegmentedList
Microsoft.Build.Framework (13)
ImmutableSegmentedList`1.cs (6)
74
public static readonly ImmutableSegmentedList<T> Empty =
new
(new SegmentedList<T>());
146
return new
ImmutableSegmentedList
<T>(list);
175
return new
ImmutableSegmentedList
<T>(list);
207
=> new
ImmutableSegmentedList
<TOutput>(_list.ConvertAll(converter));
230
=> new
ImmutableSegmentedList
<T>(_list.FindAll(match));
298
return new
ImmutableSegmentedList
<T>(self._list.GetRange(index, count));
ImmutableSegmentedList`1+PrivateInterlocked.cs (3)
23
return new
ImmutableSegmentedList
<T>(list);
32
return new
ImmutableSegmentedList
<T>(list);
41
return new
ImmutableSegmentedList
<T>(list);
ImmutableSegmentedList`1+ValueBuilder.cs (4)
124
=> new
ImmutableSegmentedList
<TOutput>(ReadOnlyList.ConvertAll(converter));
142
=> new
ImmutableSegmentedList
<T>(ReadOnlyList.FindAll(match));
194
return new
ImmutableSegmentedList
<T>(ReadOnlyList.GetRange(index, count));
325
_list = new
ImmutableSegmentedList
<T>(ReadOnlyList);
125 references to ImmutableSegmentedList
Microsoft.Build (2)
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
24
private readonly
ImmutableSegmentedList
<string> _excludes;
177
public
ImmutableSegmentedList
<string>.Builder Excludes { get; } = ImmutableSegmentedList.CreateBuilder<string>();
Microsoft.Build.Framework (123)
ImmutableSegmentedList.cs (15)
14
public static
ImmutableSegmentedList
<T> Create<T>()
15
=>
ImmutableSegmentedList
<T>.Empty;
18
public static
ImmutableSegmentedList
<T> Create<T>(T item)
19
=>
ImmutableSegmentedList
<T>.Empty.Add(item);
22
public static
ImmutableSegmentedList
<T> Create<T>(params T[] items)
23
=>
ImmutableSegmentedList
<T>.Empty.AddRange(items);
26
public static
ImmutableSegmentedList
<T>.Builder CreateBuilder<T>()
27
=>
ImmutableSegmentedList
<T>.Empty.ToBuilder();
30
public static
ImmutableSegmentedList
<T> CreateRange<T>(IEnumerable<T> items)
31
=>
ImmutableSegmentedList
<T>.Empty.AddRange(items);
34
public static
ImmutableSegmentedList
<T> ToImmutableSegmentedList<T>(this IEnumerable<T> source)
36
if (source is
ImmutableSegmentedList
<T> existingList)
39
return
ImmutableSegmentedList
<T>.Empty.AddRange(source);
43
public 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>
71
internal readonly partial struct ImmutableSegmentedList<T> : IImmutableList<T>, IReadOnlyList<T>, IList<T>, IList, IEquatable<
ImmutableSegmentedList
<T>>
74
public static readonly
ImmutableSegmentedList
<T> Empty = new(new SegmentedList<T>());
112
public static bool operator ==(
ImmutableSegmentedList
<T> left,
ImmutableSegmentedList
<T> right)
115
public static bool operator !=(
ImmutableSegmentedList
<T> left,
ImmutableSegmentedList
<T> right)
118
public static bool operator ==(
ImmutableSegmentedList
<T>? left,
ImmutableSegmentedList
<T>? right)
121
public static bool operator !=(
ImmutableSegmentedList
<T>? left,
ImmutableSegmentedList
<T>? right)
127
var
self = this;
139
public
ImmutableSegmentedList
<T> Add(T value)
141
var
self = this;
159
public
ImmutableSegmentedList
<T> AddRange(IEnumerable<T> items)
161
var
self = this;
169
if (items is
ImmutableSegmentedList
<T> immutableList)
171
else if (items is
ImmutableSegmentedList
<T>.Builder builder)
199
public
ImmutableSegmentedList
<T> Clear()
206
public
ImmutableSegmentedList
<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter)
229
public
ImmutableSegmentedList
<T> FindAll(Predicate<T> match)
255
var
self = this;
270
var
self = this;
291
public
ImmutableSegmentedList
<T> GetRange(int index, int count)
293
var
self = this;
308
public
ImmutableSegmentedList
<T> Insert(int index, T item)
310
var
self = this;
323
public
ImmutableSegmentedList
<T> InsertRange(int index, IEnumerable<T> items)
325
var
self = this;
339
var
self = this;
359
public
ImmutableSegmentedList
<T> Remove(T value)
361
var
self = this;
371
public
ImmutableSegmentedList
<T> Remove(T value, IEqualityComparer<T>? equalityComparer)
373
var
self = this;
383
public
ImmutableSegmentedList
<T> RemoveAll(Predicate<T> match)
393
public
ImmutableSegmentedList
<T> RemoveAt(int index)
402
public
ImmutableSegmentedList
<T> RemoveRange(IEnumerable<T> items)
407
var
self = this;
426
public
ImmutableSegmentedList
<T> RemoveRange(IEnumerable<T> items, IEqualityComparer<T>? equalityComparer)
431
var
self = this;
450
public
ImmutableSegmentedList
<T> RemoveRange(int index, int count)
452
var
self = this;
466
public
ImmutableSegmentedList
<T> Replace(T oldValue, T newValue)
468
var
self = this;
480
public
ImmutableSegmentedList
<T> Replace(T oldValue, T newValue, IEqualityComparer<T>? equalityComparer)
482
var
self = this;
494
public
ImmutableSegmentedList
<T> Reverse()
496
var
self = this;
506
public
ImmutableSegmentedList
<T> Reverse(int index, int count)
514
public
ImmutableSegmentedList
<T> SetItem(int index, T value)
523
public
ImmutableSegmentedList
<T> Sort()
525
var
self = this;
537
public
ImmutableSegmentedList
<T> Sort(IComparer<T>? comparer)
539
var
self = this;
551
public
ImmutableSegmentedList
<T> Sort(Comparison<T> comparison)
558
var
self = this;
570
public
ImmutableSegmentedList
<T> Sort(int index, int count, IComparer<T>? comparer)
590
return obj is
ImmutableSegmentedList
<T> other
594
public bool Equals(
ImmutableSegmentedList
<T> other)
ImmutableSegmentedList`1+Builder.cs (5)
21
internal Builder(
ImmutableSegmentedList
<T> list)
78
public
ImmutableSegmentedList
<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter)
101
public
ImmutableSegmentedList
<T> FindAll(Predicate<T> match)
141
public
ImmutableSegmentedList
<T> GetRange(int index, int count)
217
public
ImmutableSegmentedList
<T> ToImmutable()
ImmutableSegmentedList`1+PrivateInterlocked.cs (9)
17
internal static
ImmutableSegmentedList
<T> VolatileRead(in
ImmutableSegmentedList
<T> location)
26
internal static
ImmutableSegmentedList
<T> InterlockedExchange(ref
ImmutableSegmentedList
<T> location,
ImmutableSegmentedList
<T> value)
35
internal static
ImmutableSegmentedList
<T> InterlockedCompareExchange(ref
ImmutableSegmentedList
<T> location,
ImmutableSegmentedList
<T> value,
ImmutableSegmentedList
<T> comparand)
ImmutableSegmentedList`1+ValueBuilder.cs (7)
19
private
ImmutableSegmentedList
<T> _list;
27
internal ValueBuilder(
ImmutableSegmentedList
<T> list)
74
var
originalList = RoslynImmutableInterlocked.InterlockedExchange(ref _list, default);
123
public
ImmutableSegmentedList
<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter)
141
public
ImmutableSegmentedList
<T> FindAll(Predicate<T> match)
189
public
ImmutableSegmentedList
<T> GetRange(int index, int count)
323
public
ImmutableSegmentedList
<T> ToImmutable()
RoslynImmutableInterlocked.cs (26)
30
public static bool Update<T>(ref
ImmutableSegmentedList
<T> location, Func<
ImmutableSegmentedList
<T>,
ImmutableSegmentedList
<T>> transformer)
35
var
oldValue =
ImmutableSegmentedList
<T>.PrivateInterlocked.VolatileRead(in location);
38
var
newValue = transformer(oldValue);
45
var
interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue);
71
public static bool Update<T, TArg>(ref
ImmutableSegmentedList
<T> location, Func<
ImmutableSegmentedList
<T>, TArg,
ImmutableSegmentedList
<T>> transformer, TArg transformerArgument)
76
var
oldValue =
ImmutableSegmentedList
<T>.PrivateInterlocked.VolatileRead(in location);
79
var
newValue = transformer(oldValue, transformerArgument);
86
var
interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue);
102
public static
ImmutableSegmentedList
<T> InterlockedExchange<T>(ref
ImmutableSegmentedList
<T> location,
ImmutableSegmentedList
<T> value)
104
return
ImmutableSegmentedList
<T>.PrivateInterlocked.InterlockedExchange(ref location, value);
116
public static
ImmutableSegmentedList
<T> InterlockedCompareExchange<T>(ref
ImmutableSegmentedList
<T> location,
ImmutableSegmentedList
<T> value,
ImmutableSegmentedList
<T> comparand)
118
return
ImmutableSegmentedList
<T>.PrivateInterlocked.InterlockedCompareExchange(ref location, value, comparand);
130
public static bool InterlockedInitialize<T>(ref
ImmutableSegmentedList
<T> location,
ImmutableSegmentedList
<T> value)
132
return InterlockedCompareExchange(ref location, value, default(
ImmutableSegmentedList
<T>)).IsDefault;