6 interfaces inheriting from ICollection
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\IExtensionCollection.cs (1)
11public interface IExtensionCollection<T> : ICollection<IExtension<T>>
Microsoft.Maui (1)
Hosting\Fonts\IFontCollection.cs (1)
9 public interface IFontCollection : IList<FontDescriptor>, ICollection<FontDescriptor>, IEnumerable<FontDescriptor>, IEnumerable
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionary.cs (1)
12public interface IDictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IList.cs (1)
13public interface IList<T> : ICollection<T>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ISet.cs (1)
11public interface ISet<T> : ICollection<T>
System.ServiceModel.Primitives (1)
netstandard.cs (1)
841public partial interface IExtensionCollection<T> : System.Collections.Generic.ICollection<System.ServiceModel.IExtension<T>>, System.Collections.Generic.IEnumerable<System.ServiceModel.IExtension<T>>, System.Collections.IEnumerable where T : System.ServiceModel.IExtensibleObject<T>
319 implementations of ICollection
Analyzer.Utilities.UnitTests (1)
Extensions\IEnumerableExensionsTests.cs (1)
132private sealed class IntCollection : ICollection<int>
aspire (1)
src\Shared\CircularBuffer.cs (1)
16internal sealed class CircularBuffer<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Aspire.Dashboard (1)
src\Shared\CircularBuffer.cs (1)
16internal sealed class CircularBuffer<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Aspire.Hosting (1)
src\Shared\CircularBuffer.cs (1)
16internal sealed class CircularBuffer<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (1)
414internal class ChannelCollection : ICollection<IChannel>
GenerateDocumentationAndConfigFiles (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Metrics (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Metrics.Legacy (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
2416internal class CustomCollection<T> : ICollection<T>
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
771private class CollectionImplementation : ICollection<string>
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
ActionParametersIntegrationTest.cs (1)
1000private class CustomReadOnlyCollection<T> : ICollection<T>
CollectionModelBinderIntegrationTest.cs (2)
1232private class ExplicitClosedGenericCollection : ICollection<string> 1372private class ExplicitCollection<T> : ICollection<T>
TryUpdateModelIntegrationTest.cs (1)
1291private class CustomReadOnlyCollection<T> : ICollection<T>
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
AttributeDictionary.cs (2)
366private sealed class KeyCollection : ICollection<string> 473private sealed class ValueCollection : ICollection<string?>
Microsoft.AspNetCore.Routing (1)
RouteEndpointDataSource.cs (1)
364private sealed class ThrowOnAddAfterEndpointBuiltConventionCollection : List<Action<EndpointBuilder>>, ICollection<Action<EndpointBuilder>>
Microsoft.AspNetCore.Server.HttpSys (1)
UrlPrefixCollection.cs (1)
15public class UrlPrefixCollection : ICollection<UrlPrefix>
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\ServerAddressesCollection.cs (2)
13internal sealed class ServerAddressesCollection : ICollection<string> 102private sealed class PublicServerAddressesCollection : ICollection<string>
Microsoft.CodeAnalysis (13)
Collections\IdentifierCollection.Collection.cs (1)
15private abstract class CollectionBase : ICollection<string>
Collections\UnionCollection.cs (1)
26internal class UnionCollection<T> : ICollection<T>
InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Analyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.BannedApiAnalyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Collections.Package (10)
Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Extensions.Package (10)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.InteractiveHost (10)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.PublicApiAnalyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.ResxSourceGenerator (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Microsoft.CodeAnalysis.Threading.Package (10)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.UnitTests (1)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
154private class CollectionWithLargeCount : ICollection<T>
Microsoft.CodeAnalysis.Workspaces (11)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.AI (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.AI.Abstractions (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.AI.Ollama (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Extensions.Http.Diagnostics (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.Logging.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.Metrics.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Gen.MetricsReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Microsoft.Maui (1)
Primitives\LockableObservableListWrapper.cs (1)
12 public class LockableObservableListWrapper : IList<string>, ICollection<string>, INotifyCollectionChanged, INotifyPropertyChanged, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable
Microsoft.Maui.Controls (2)
DefinitionCollection.cs (1)
8 public class DefinitionCollection<T> : IList<T>, ICollection<T> where T : IDefinition
Interactivity\AttachedCollection.cs (1)
8 internal class AttachedCollection<T> : ObservableCollection<T>, ICollection<T>, IAttachedObject where T : BindableObject, IAttachedObject
PresentationCore (6)
MS\Internal\FontFace\TypefaceCollection.cs (1)
11internal unsafe struct TypefaceCollection : ICollection<Typeface>
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
10internal class SequentialUshortCollection : ICollection<ushort>
System\Windows\Ink\StrokeCollection.cs (1)
841internal class ReadOnlyStrokeCollection : StrokeCollection, ICollection<Stroke>, IList
System\Windows\Media\Animation\TimelineClockCollection.cs (1)
9public class ClockCollection : ICollection<Clock>
System\Windows\Media\Fonts.cs (1)
278private struct TypefaceCollection : ICollection<Typeface>
System\Windows\Media\GlyphTypeface.cs (1)
1863private class ValueCollection : ICollection<double>
PresentationFramework (5)
MS\Internal\WeakDictionary.cs (2)
16private class KeyCollection<KeyType, ValueType> : ICollection<KeyType> where KeyType : class 103private class ValueCollection<KeyType, ValueType> : ICollection<ValueType> where KeyType : class
MS\Internal\WeakHashSet.cs (1)
15internal class WeakHashSet<T> : ICollection<T> where T : class
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
22public class XmlNamespaceMappingCollection : XmlNamespaceManager, ICollection<XmlNamespaceMapping>, IAddChildInternal
System\Windows\Documents\TextElementCollection.cs (1)
16public class TextElementCollection<TextElementType> : IList, ICollection<TextElementType> where TextElementType : TextElement
Roslyn.Diagnostics.Analyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Shared (1)
EmptyCollections\EmptyReadOnlyList.cs (1)
17internal sealed class EmptyReadOnlyList<T> : IReadOnlyList<T>, ICollection<T>
Shared.Tests (1)
EmptyCollections\EmptyCollectionExtensionsTests.cs (1)
88private sealed class Collection<T> : ICollection<T>
System.Collections (4)
System\Collections\Generic\LinkedList.cs (1)
15public class LinkedList<T> : ICollection<T>, ICollection, IReadOnlyCollection<T>, ISerializable, IDeserializationCallback
System\Collections\Generic\SortedDictionary.cs (2)
515public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 676public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
System\Collections\Generic\SortedSet.cs (1)
49public partial class SortedSet<T> : ISet<T>, ICollection<T>, ICollection, IReadOnlyCollection<T>, IReadOnlySet<T>, ISerializable, IDeserializationCallback
System.Collections.Immutable (4)
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
19public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, IReadOnlySet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\ImmutableHashSet_1.HashBucketByRefEqualityComparer.cs (1)
11public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\ImmutableHashSet_1.HashBucketByValueEqualityComparer.cs (1)
11public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
15internal abstract class KeysOrValuesCollectionAccessor<TKey, TValue, T> : ICollection<T>, ICollection where TKey : notnull
System.ComponentModel.Composition (3)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (2)
37private sealed class CollectionOfObjectList : ICollection<object> 92private sealed class CollectionOfObject<T> : ICollection<object>
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (1)
20internal sealed class ComposablePartCatalogCollection : ICollection<ComposablePartCatalog>, INotifyComposablePartCatalogChanged, IDisposable
System.DirectoryServices.AccountManagement (2)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net10.0\System.DirectoryServices.AccountManagement.notsupported.cs (2)
226public partial class PrincipalCollection : System.Collections.Generic.ICollection<System.DirectoryServices.AccountManagement.Principal>, System.Collections.Generic.IEnumerable<System.DirectoryServices.AccountManagement.Principal>, System.Collections.ICollection, System.Collections.IEnumerable 353public partial class PrincipalValueCollection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList
System.Linq (2)
System\Linq\Lookup.cs (2)
262internal sealed class CollectionLookup<TKey, TElement> : Lookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>> 302internal sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
System.Linq.Expressions (2)
System\Dynamic\ExpandoObject.cs (2)
349private sealed class KeyCollection : ICollection<string> 488private sealed class ValueCollection : ICollection<object?>
System.Net.Http (2)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (2)
304public sealed partial class HttpRequestOptions : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IDictionary<string, object?>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IReadOnlyDictionary<string, object?>, System.Collections.IEnumerable 661public sealed partial class HttpHeaderValueCollection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable where T : class
System.Net.HttpListener (1)
System\Net\HttpListenerPrefixCollection.cs (1)
29public class HttpListenerPrefixCollection : ICollection<string>
System.Net.NetworkInformation (4)
artifacts\obj\System.Net.NetworkInformation\Debug\net10.0\System.Net.NetworkInformation.notsupported.cs (4)
22public partial class GatewayIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.GatewayIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.GatewayIPAddressInformation>, System.Collections.IEnumerable 143public partial class IPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.IPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.IPAddressInformation>, System.Collections.IEnumerable 368public partial class MulticastIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.MulticastIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.MulticastIPAddressInformation>, System.Collections.IEnumerable 607public partial class UnicastIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.UnicastIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.UnicastIPAddressInformation>, System.Collections.IEnumerable
System.Net.Primitives (2)
artifacts\obj\System.Net.Primitives\Debug\net10.0\System.Net.Primitives.notsupported.cs (2)
49public partial class CookieCollection : System.Collections.Generic.ICollection<System.Net.Cookie>, System.Collections.Generic.IEnumerable<System.Net.Cookie>, System.Collections.Generic.IReadOnlyCollection<System.Net.Cookie>, System.Collections.ICollection, System.Collections.IEnumerable 406public partial class IPAddressCollection : System.Collections.Generic.ICollection<System.Net.IPAddress>, System.Collections.Generic.IEnumerable<System.Net.IPAddress>, System.Collections.IEnumerable
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (2)
1885public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 2080public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
17public class HashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>, IReadOnlySet<T>, ISerializable, IDeserializationCallback
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (2)
247public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 303public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
System.Security.Principal.Windows (1)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (1)
42public partial class IdentityReferenceCollection : System.Collections.Generic.ICollection<System.Security.Principal.IdentityReference>, System.Collections.Generic.IEnumerable<System.Security.Principal.IdentityReference>, System.Collections.IEnumerable
System.ServiceModel.Primitives (1)
netstandard.cs (1)
1721public sealed partial class MessageProperties : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.Generic.IDictionary<string, object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.IEnumerable, System.IDisposable
System.Speech (1)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (1)
296public sealed partial class SemanticValue : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>>, System.Collections.Generic.IDictionary<string, System.Speech.Recognition.SemanticValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>>, System.Collections.IEnumerable
System.Windows.Forms (1)
System\Windows\Forms\Controls\UpDown\NumericUpDownAccelerationCollection.cs (1)
14public class NumericUpDownAccelerationCollection : MarshalByRefObject, ICollection<NumericUpDownAcceleration>, IEnumerable<NumericUpDownAcceleration>
System.Windows.Forms.Primitives (1)
System\Windows\Forms\NonNullCollection.cs (1)
13: IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>
System.Xaml.Tests (4)
System\Xaml\XamlTypeTests.cs (4)
1818private class MultiICollectionImplementer : ICollection<int>, ICollection<object> 3099private class MultipleICollection : ICollection<object>, ICollection<int>
Test.Utilities (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
Text.Analyzers (12)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
18public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
18public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
15public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
15public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
1294public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1502public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
16internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
16internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
17internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
19internal sealed class PooledConcurrentSet<T> : ICollection<T>, IDisposable
5138 references to ICollection
aspire (2)
Commands\ExecCommand.cs (2)
282private (ICollection<string> arbitary, ICollection<string> command) ParseCmdArgs(ParseResult parseResult)
Aspire.Dashboard (4)
Components\Dialogs\TextVisualizerDialog.razor.cs (2)
48public ICollection<StringLogLine> FormattedLines { get; set; } = []; 146private ICollection<StringLogLine> GetLines()
Model\Otlp\ApplicationsSelectHelpers.cs (2)
10public static SelectViewModel<ResourceTypeDetails> GetApplication(this ICollection<SelectViewModel<ResourceTypeDetails>> applications, ILogger logger, string? name, bool canSelectGrouping, SelectViewModel<ResourceTypeDetails> fallback) 49static SelectViewModel<ResourceTypeDetails> MultipleMatches(ICollection<SelectViewModel<ResourceTypeDetails>> applications, ILogger logger, string name, List<SelectViewModel<ResourceTypeDetails>> matches)
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
82where TValue : ICollection<TEntry>, new()
ConfigurationSchemaGenerator.Tests (2)
VariousTypes.cs (2)
76/// A <see cref="ICollection{T}"/> containing <see cref="int"/> elements. 78public ICollection<int> PropertyOfIntCollection { get; } = [];
dotnet-dev-certs (2)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
dotnet-openapi (3)
Commands\BaseCommand.cs (1)
155var items = project.GetItems(tagName);
Commands\RefreshCommand.cs (1)
42var openApiReferenceItems = project.GetItems(OpenApiReference);
Commands\RemoveCommand.cs (1)
54var openApiReferenceItems = project.GetItems(tagName);
dotnet-svcutil-lib (170)
CodeDomFixup\System.ServiceModel.FederationCodeGen.cs (1)
76public System.Collections.Generic.ICollection<System.Xml.XmlElement> AdditionalRequestParameters => default;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (3)
907internal ICollection<CodeTypeReference> GetKnownTypeReferences(DataContract dataContract) 913ICollection<DataContract> knownTypeContracts = knownTypeDictionary.Values; 999ICollection<DataContract> knownTypeContracts = knownContractDictionary.Values;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (4)
22private ICollection<Type> _referencedTypes; 23private ICollection<Type> _referencedCollectionTypes; 27internal DataContractSet(IDataContractSurrogate dataContractSurrogate, ICollection<Type> referencedTypes, ICollection<Type> referencedCollectionTypes)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
717s_typeOfICollectionGeneric = typeof(ICollection<>);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ImportOptions.cs (4)
17private ICollection<Type> _referencedTypes; 18private ICollection<Type> _referencedCollectionTypes; 47public ICollection<Type> ReferencedTypes 59public ICollection<Type> ReferencedCollectionTypes
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (4)
24private ICollection<XmlQualifiedName> _typeNames; 25private ICollection<XmlSchemaElement> _elements; 38internal SchemaImporter(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames, ICollection<XmlSchemaElement> elements, XmlQualifiedName[] elementTypeNames, DataContractSet dataContractSet, bool importXmlDataType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
476internal void IncrementCollectionCountGeneric<T>(XmlWriterDelegator xmlWriter, ICollection<T> collection)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XsdDataContractImporter.cs (7)
80public void Import(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames) 125public bool CanImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames) 194public ICollection<CodeTypeReference> GetKnownTypeReferences(XmlQualifiedName typeName) 231private void InternalImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames, ICollection<XmlSchemaElement> elements, XmlQualifiedName[] elementTypeNames/*filled on return*/) 266private bool InternalCanImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames, ICollection<XmlSchemaElement> elements, XmlQualifiedName[] elementTypeNames)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (7)
62ICollection<XmlElement> operationBindingAssertions = policyContext.GetOperationBindingAssertions(operation); 95private void ImportProtectionAssertions(ICollection<XmlElement> assertions, out MessagePartSpecification signedParts, out MessagePartSpecification encryptedParts) 236ICollection<XmlElement> endpointBindingAssertions = policyContext.GetBindingAssertions(); 254ICollection<XmlElement> operationBindingAssertions = policyContext.GetOperationBindingAssertions(operation); 268ICollection<XmlElement> messageBindingAssertions = policyContext.GetMessageBindingAssertions(message); 362ICollection<XmlElement> faultBindingAssertions = policyContext.GetFaultBindingAssertions(fault); 471private void ImportSupportingTokenAssertions(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, SupportingTokenParameters requirements, SupportingTokenParameters optionalRequirements)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
1689((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ContextBindingElementImporter.cs (1)
22public void BeforeImport(ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ContextBindingElementPolicy.cs (1)
39public static bool TryGetHttpUseCookieAssertion(ICollection<XmlElement> assertions, out XmlElement httpUseCookieAssertion)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpTransportBindingElement.cs (1)
497ICollection<XmlElement> bindingAssertions = policyContext.GetBindingAssertions();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (2)
1022((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0); 1709((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageBuffer.cs (1)
68((ICollection<KeyValuePair<string, object>>)message.Properties).CopyTo(_properties, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncodingBindingElementImporter.cs (3)
15void IWsdlImportExtension.BeforeImport(ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) 181ICollection<XmlElement> assertions = context.GetBindingAssertions(); 213private MessageEncodingBindingElement CreateEncodingBindingElement(ICollection<XmlElement> assertions, out XmlElement encodingAssertion)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (6)
160public ICollection<string> Keys 220public ICollection<object> Values 720void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int index) 761void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> pair) 771bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> pair) 833bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> pair)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (1)
304private void GetSupportingTokensCapabilities(ICollection<SecurityTokenParameters> parameters, out bool supportsClientAuth, out bool supportsWindowsIdentity)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StandardBindingImporter.cs (1)
17void IWsdlImportExtension.BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) { }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElementImporter.cs (1)
54ICollection<XmlElement> operationAssertions = context.GetOperationBindingAssertions(operation);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportBindingElementImporter.cs (1)
24void IWsdlImportExtension.BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UdpTransportBindingElement.cs (1)
201ICollection<XmlElement> bindingAssertions = policyContext.GetBindingAssertions();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UdpTransportImporter.cs (1)
19public void BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UnrecognizedAssertionsBindingElement.cs (13)
17private ICollection<XmlElement> _bindingAsserions; 18private IDictionary<OperationDescription, ICollection<XmlElement>> _operationAssertions; 19private IDictionary<MessageDescription, ICollection<XmlElement>> _messageAssertions; 21internal protected UnrecognizedAssertionsBindingElement(XmlQualifiedName wsdlBinding, ICollection<XmlElement> bindingAsserions) 33internal ICollection<XmlElement> BindingAsserions 43internal IDictionary<OperationDescription, ICollection<XmlElement>> OperationAssertions 48_operationAssertions = new Dictionary<OperationDescription, ICollection<XmlElement>>(); 53internal IDictionary<MessageDescription, ICollection<XmlElement>> MessageAssertions 58_messageAssertions = new Dictionary<MessageDescription, ICollection<XmlElement>>(); 63internal void Add(OperationDescription operation, ICollection<XmlElement> assertions) 65ICollection<XmlElement> existent; 77internal void Add(MessageDescription message, ICollection<XmlElement> assertions) 79ICollection<XmlElement> existent;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerMessageContractImporter.cs (2)
49void IWsdlImportExtension.BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) { } 76void IWsdlImportExtension.BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) { }
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (5)
20private Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> _knownTypes; 31internal void Add(MessagePartDescription part, CodeTypeReference typeReference, ICollection<CodeTypeReference> knownTypeReferences, bool isNonNillableReferenceType) 54internal Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> KnownTypes 59_knownTypes = new Dictionary<MessagePartDescription, ICollection<CodeTypeReference>>(); 102ICollection<CodeTypeReference> knownTypesForPart;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\IWsdlImportExtension.cs (1)
14void BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (2)
1672ICollection<CodeTypeReference> knownTypeRefs = DataContractImporter.GetKnownTypeReferences(typeName); 1732ICollection<CodeTypeReference> knownTypeRefs = DataContractImporter.GetKnownTypeReferences(typeName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (4)
66internal void GenerateOperation(OperationContractGenerationContext context, ref OperationFormatStyle style, bool isEncoded, IWrappedBodyTypeGenerator wrappedBodyTypeGenerator, Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> knownTypes) 99private readonly Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> _knownTypes; 122internal MethodSignatureGenerator(OperationGenerator parent, OperationContractGenerationContext context, OperationFormatStyle style, bool isEncoded, IWrappedBodyTypeGenerator wrappedBodyTypeGenerator, Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> knownTypes) 621ICollection<CodeTypeReference> knownTypesForPart = null;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\PolicyConversionContext.cs (1)
41internal static XmlElement FindAssertion(ICollection<XmlElement> assertions, string localName, string namespaceUri, bool remove)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (4)
728ICollection<XmlElement> assertions; 799private void AttachItemPolicy(ICollection<XmlElement> assertions, string key, WsdlNS.ServiceDescription policyWsdl, WsdlNS.DocumentableItem item) 822private string InsertPolicy(string key, WsdlNS.ServiceDescription policyWsdl, ICollection<XmlElement> assertions) 843private XmlElement CreatePolicyElement(ICollection<XmlElement> assertions)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
145_operationGenerator.GenerateOperation(context, ref style, xmlSerializerFormatAttribute.IsEncoded, new WrappedBodyTypeGenerator(context), new Dictionary<MessagePartDescription, ICollection<CodeTypeReference>>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientOperation.cs (1)
201public ICollection<IParameterInspector> ClientParameterInspectors
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
340public ICollection<IClientMessageInspector> ClientMessageInspectors 351public ICollection<ClientOperation> ClientOperations
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
683((ICollection<KeyValuePair<string, object>>)base.Properties).CopyTo(properties, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\ExtensionCollection.cs (1)
32bool ICollection<IExtension<T>>.IsReadOnly
FrameworkFork\System.ServiceModel\System\ServiceModel\InstanceContext.cs (3)
110public ICollection<IChannel> IncomingChannels 119public ICollection<IChannel> OutgoingChannels 148internal ICollection<IChannel> WmiChannels
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\MessagePartSpecification.cs (1)
19public ICollection<XmlQualifiedName> HeaderTypes
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ScopedMessagePartSpecification.cs (1)
24public ICollection<string> Actions
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (10)
88private ICollection<SupportingTokenAuthenticatorSpecification> _channelSupportingTokenAuthenticatorSpecification; 89private Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>> _scopedSupportingTokenAuthenticatorSpecification; 124_scopedSupportingTokenAuthenticatorSpecification = new Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>>(); 145_scopedSupportingTokenAuthenticatorSpecification = new Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>>(factory._scopedSupportingTokenAuthenticatorSpecification); 472public ICollection<SupportingTokenAuthenticatorSpecification> ChannelSupportingTokenAuthenticatorSpecification 480public Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>> ScopedSupportingTokenAuthenticatorSpecification 659ICollection<SupportingTokenAuthenticatorSpecification> supportingAuthenticators = _scopedSupportingTokenAuthenticatorSpecification[action]; 679ICollection<SupportingTokenAuthenticatorSpecification> supportingAuthenticators = _scopedSupportingTokenAuthenticatorSpecification[action]; 735private void VerifyTypeUniqueness(ICollection<SupportingTokenAuthenticatorSpecification> supportingTokenAuthenticators) 803ICollection<SupportingTokenAuthenticatorSpecification> scopedAuthenticators = _scopedSupportingTokenAuthenticatorSpecification[action];
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (40)
143public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name, out XmlElement assertion) 160public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name) 165public virtual bool TryImportWsspAssertion(ICollection<XmlElement> assertions, string name, bool isOptional) 184public virtual bool CanImportAssertion(ICollection<XmlElement> assertions) 225public virtual bool TryImportMsspAssertion(ICollection<XmlElement> assertions, string name) 359public virtual bool TryImportWsspEncryptedPartsAssertion(ICollection<XmlElement> assertions, out MessagePartSpecification parts, out XmlElement assertion) 373public virtual bool TryImportWsspSignedPartsAssertion(ICollection<XmlElement> assertions, out MessagePartSpecification parts, out XmlElement assertion) 457public virtual bool TryImportWsspSymmetricBindingAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, out SymmetricSecurityBindingElement binding, out XmlElement assertion) 519public virtual bool TryImportWsspAsymmetricBindingAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, out AsymmetricSecurityBindingElement binding, out XmlElement assertion) 572public virtual bool TryImportWsspTransportBindingAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, out TransportSecurityBindingElement binding, out XmlElement assertion) 644public virtual bool TryImportWsspWssAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion) 806public abstract bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion); 822protected bool TryImportWsspTrustAssertion(string trustName, MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion) 1044public virtual bool TryImportWsspSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing) 1089protected bool TryImportWsspSignedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, out XmlElement assertion) 1169protected bool TryImportWsspEndorsingSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> optionalEndorsing, out XmlElement assertion) 1233protected bool TryImportWsspSignedEndorsingSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing, out XmlElement assertion) 1428public virtual bool TryImportMessageProtectionOrderAssertions(ICollection<XmlElement> assertions, out MessageProtectionOrder order) 1458public virtual bool TryImportWsspIncludeTimestampAssertion(ICollection<XmlElement> assertions, SecurityBindingElement binding) 1464public virtual bool TryImportWsspProtectTokensAssertion(ICollection<XmlElement> assertions, out bool protectTokens) 1490public virtual bool TryImportWsspLayoutAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding) 1540public virtual bool TryImportLayoutAssertion(ICollection<XmlElement> assertions, out SecurityHeaderLayout layout) 1581public virtual bool TryImportWsspAlgorithmSuiteAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding) 1657public virtual bool TryImportAlgorithmSuiteAssertion(ICollection<XmlElement> assertions, out SecurityAlgorithmSuite suite) 1711public virtual bool TryImportWsspProtectionTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, SymmetricSecurityBindingElement binding) 1737public virtual bool TryImportWsspInitiatorTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, AsymmetricSecurityBindingElement binding) 1763public virtual bool TryImportWsspRecipientTokenAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, AsymmetricSecurityBindingElement binding) 1833public virtual bool TryImportWsspTransportTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, out XmlElement transportBindingAssertion) 2021public virtual bool TryImportWsspRequireDerivedKeysAssertion(ICollection<XmlElement> assertions, SecurityTokenParameters parameters) 2101public virtual bool TryImportX509ReferenceStyleAssertion(ICollection<XmlElement> assertions, X509SecurityTokenParameters parameters) 2257public virtual bool TryImportReferenceStyleAssertion(ICollection<XmlElement> assertions, IssuedSecurityTokenParameters parameters) 2488public virtual bool TryImportWsspMustNotSendCancelAssertion(ICollection<XmlElement> assertions, out bool requireCancellation) 2551public abstract bool TryImportWsspHttpsTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, HttpsTransportBindingElement httpsBinding); 2553public virtual bool ContainsWsspHttpsTokenAssertion(ICollection<XmlElement> assertions) 2570public virtual bool TryImportMsspRequireClientCertificateAssertion(ICollection<XmlElement> assertions, SslSecurityTokenParameters parameters) 2703public virtual ICollection<XmlElement> FilterWsspPolicyAssertions(ICollection<XmlElement> policyAssertions) 2714public virtual bool TryImportWsspBootstrapPolicyAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecureConversationSecurityTokenParameters parameters) 3067public static bool TryGetSecurityPolicyDriver(ICollection<XmlElement> assertions, out WSSecurityPolicy securityPolicy) 3093public bool TryGetSecurityPolicyDriver(ICollection<XmlElement> assertions, out WSSecurityPolicy securityPolicy)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy11.cs (3)
58public override bool TryImportWsspMustNotSendCancelAssertion(ICollection<XmlElement> assertions, out bool requireCancellation) 71public override bool TryImportWsspHttpsTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, HttpsTransportBindingElement httpsBinding) 113public override bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy12.cs (8)
79public override bool TryImportWsspHttpsTokenAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, HttpsTransportBindingElement httpsBinding) 365public virtual bool TryImportWsspMustNotSendAmendAssertion(ICollection<XmlElement> assertions) 371public virtual bool TryImportWsspMustNotSendRenewAssertion(ICollection<XmlElement> assertions, out bool canRenewSession) 447public override bool TryImportWsspSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> endorsing, Collection<SecurityTokenParameters> signedEndorsing, Collection<SecurityTokenParameters> optionalSigned, Collection<SecurityTokenParameters> optionalSignedEncrypted, Collection<SecurityTokenParameters> optionalEndorsing, Collection<SecurityTokenParameters> optionalSignedEndorsing) 502private bool TryImportWsspSignedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signed, Collection<SecurityTokenParameters> optionalSigned, out XmlElement assertion) 550private bool TryImportWsspSignedEncryptedSupportingTokensAssertion(MetadataImporter importer, PolicyConversionContext policyContext, ICollection<XmlElement> assertions, Collection<SecurityTokenParameters> signedEncrypted, Collection<SecurityTokenParameters> optionalSignedEncrypted, out XmlElement assertion) 598public override bool TryImportWsspRequireDerivedKeysAssertion(ICollection<XmlElement> assertions, SecurityTokenParameters parameters) 622public override bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (4)
42public ICollection<IChannel> IncomingChannels 47return (ICollection<IChannel>)_incomingChannels; 51public ICollection<IChannel> OutgoingChannels 77ICollection<IChannel> outgoing = _outgoingChannels;
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
214bool ICollection<T>.IsReadOnly
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (4)
125bool ICollection<T>.IsReadOnly 142void ICollection<T>.Add(T value) 147void ICollection<T>.Clear() 152bool ICollection<T>.Remove(T value)
ImportModule.cs (2)
380void IWsdlImportExtension.BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) { } 430public void BeforeImport(WsdlNS.ServiceDescriptionCollection wsdlDocuments, XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy) { }
Shared\Options\ListValue.cs (1)
113void ICollection<TValue>.Add(TValue value)
GenerateDocumentationAndConfigFiles (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
HtmlGenerationWebSite (1)
Models\Order.cs (1)
20public ICollection<string> PaymentMethod
Identity.DefaultUI.WebSite (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
IdentitySample.Mvc (2)
Models\AccountViewModels\SendCodeViewModel.cs (1)
12public ICollection<SelectListItem> Providers { get; set; }
Models\ManageViewModels\ConfigureTwoFactorViewModel.cs (1)
12public ICollection<SelectListItem> Providers { get; set; }
IdentitySample.PasskeyConformance (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
IdentitySample.PasskeyUI (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
illink (3)
InMemory.FunctionalTests (7)
Http2\Http2ConnectionTests.cs (2)
295public ICollection<string> Keys => _innerHeaders.Keys; 296public ICollection<StringValues> Values => _innerHeaders.Values;
Http2\Http2TestBase.cs (1)
507public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
Http3\Http3ConnectionTests.cs (2)
859public ICollection<string> Keys => _innerHeaders.Keys; 860public ICollection<StringValues> Values => _innerHeaders.Values;
KestrelMetricsTests.cs (1)
433public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1040public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
Metrics (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Metrics.Legacy (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.Analyzers.Extra (3)
Utilities\SyntaxNodeExtensions.cs (3)
45ICollection<string> expectedFullMethodNames) 105ICollection<string> expectedFullMethodNames, 106ICollection<Type> typesToStopTraversing)
Microsoft.Analyzers.Local.Tests (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Arcade.Test.Common (3)
MockEngine.cs (3)
27public ICollection<BuildMessageEventArgs> Messages { get; } = new List<BuildMessageEventArgs>(); 28public ICollection<BuildWarningEventArgs> Warnings { get; } = new List<BuildWarningEventArgs>(); 29public ICollection<BuildErrorEventArgs> Errors { get; } = new List<BuildErrorEventArgs>();
Microsoft.AspNetCore (5)
WebApplication.cs (5)
69public ICollection<string> Urls => ServerFeatures.GetRequiredFeature<IServerAddressesFeature>().Addresses; 83internal ICollection<EndpointDataSource> DataSources => _dataSources; 84ICollection<EndpointDataSource> IEndpointRouteBuilder.DataSources => DataSources; 239var addresses = ServerFeatures.Get<IServerAddressesFeature>()?.Addresses; 246throw new InvalidOperationException($"Changing the URL is not supported because {nameof(IServerAddressesFeature.Addresses)} {nameof(ICollection<string>.IsReadOnly)}.");
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (1)
66|| contractType.GetGenericTypeDefinition() == typeof(ICollection<>)
Microsoft.AspNetCore.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.AspNetCore.Authentication.Core.Test (4)
AuthenticationPropertiesTests.cs (4)
154props.SetParameter<ICollection<string>>("foo", list); 155Assert.Equal(new string[] { "a", "b", "c" }, props.GetParameter<ICollection<string>>("foo")); 159props.SetParameter<ICollection<string>?>("foo", null); 160Assert.Null(props.GetParameter<ICollection<string>>("foo"));
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookOptions.cs (1)
93public ICollection<string> Fields { get; } = new HashSet<string>();
Microsoft.AspNetCore.Authentication.OAuth (5)
OAuthChallengeProperties.cs (2)
41public ICollection<string> Scope 43get => GetParameter<ICollection<string>>(ScopeKey)!;
OAuthHandler.cs (2)
302var scopeParameter = properties.GetParameter<ICollection<string>>(OAuthChallengeProperties.ScopeKey);
OAuthOptions.cs (1)
84public ICollection<string> Scope { get; } = new HashSet<string>();
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectConfigureOptions.cs (1)
110private static void ClearAndSetListOption(ICollection<string> listOption, IConfigurationSection listConfigSection)
OpenIdConnectHandler.cs (1)
407Scope = string.Join(" ", properties.GetParameter<ICollection<string>>(OpenIdConnectParameterNames.Scope) ?? Options.Scope),
OpenIdConnectOptions.cs (1)
237public ICollection<string> Scope { get; } = new HashSet<string>();
Microsoft.AspNetCore.Authentication.Test (15)
OpenIdConnect\TestSettings.cs (15)
167ICollection<string> errors, 216private void ValidateExpectedAuthority(string absoluteUri, ICollection<string> errors, OpenIdConnectRequestType requestType) 238private void ValidateClientId(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 241private void ValidateResponseType(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 244private void ValidateResponseMode(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 247private void ValidateScope(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 250private void ValidateRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 253private void ValidateResource(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 256private void ValidateState(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 259private static void ValidateSkuTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors) 267private void ValidateVersionTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 270private void ValidatePostLogoutRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 273private void ValidateMaxAge(IDictionary<string, string> actualQuery, ICollection<string> errors, bool htmlEncoded) 287private void ValidatePrompt(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) => 294ICollection<string> errors,
Microsoft.AspNetCore.Authentication.WsFederation (3)
WsFederationOptions.cs (3)
22private ICollection<ISecurityTokenValidator> _securityTokenHandlers = new Collection<ISecurityTokenValidator>() 109public ICollection<ISecurityTokenValidator> SecurityTokenHandlers 124public ICollection<TokenHandler> TokenHandlers
Microsoft.AspNetCore.Components (7)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (7)
315bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 318public ICollection<string> Keys 338public ICollection<object?> Values 358void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 409bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 441void ICollection<KeyValuePair<string, object?>>.CopyTo( 482bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Components.Endpoints (9)
Builder\RazorComponentEndpointDataSource.cs (1)
134ICollection<IComponentRenderMode> renderModes = Options.ConfiguredRenderModes;
FormMapping\Converters\CollectionAdapters\ImplementingCollectionBufferAdapter.cs (1)
7where TBuffer : TCollection, ICollection<TElement>, new()
FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (1)
43where TCustomCollection : TCollection, ICollection<TElement>, new()
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (6)
65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 88var _ when type == (typeof(ICollection<TElement>)) => true, 164var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) 197var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) => 198CreateConverter<ICollection<TElement>, List<TElement>>(elementTypeConverter), 212where TImplementation : TInterface, ICollection<TElement>, new()
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Binding\FormDataMapperTests.cs (1)
698CanDeserialize_Collection<ICollection<int>, List<int>, int>(expected);
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (3)
185var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 211var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 280public ICollection<EndpointDataSource> DataSources { get; } = [];
HotReloadServiceTests.cs (1)
300public ICollection<EndpointDataSource> DataSources => _dataSources;
RazorComponentEndpointDataSourceTest.cs (1)
316public ICollection<EndpointDataSource> DataSources => _dataSources;
Microsoft.AspNetCore.Components.QuickGrid (3)
GridItemsProviderResult.cs (2)
15public required ICollection<TGridItem> Items { get; init; } 40public static GridItemsProviderResult<TGridItem> From<TGridItem>(ICollection<TGridItem> items, int totalItemCount)
QuickGrid.razor.cs (1)
118private ICollection<TGridItem> _currentNonVirtualizedViewItems = Array.Empty<TGridItem>();
Microsoft.AspNetCore.Components.Server (1)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
134public ICollection<EndpointDataSource> DataSources { get; } = new List<EndpointDataSource>() { };
Microsoft.AspNetCore.Components.Web (1)
Virtualization\Virtualize.cs (1)
106public ICollection<TItem>? Items { get; set; }
Microsoft.AspNetCore.Components.Web.Tests (1)
Virtualization\VirtualizeTest.cs (1)
111ICollection<TItem> items,
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
WebAssemblyEndpointProvider.cs (1)
57public ICollection<EndpointDataSource> DataSources { get; } = [];
Microsoft.AspNetCore.Connections.Abstractions (10)
ConnectionItems.cs (9)
64ICollection<object> IDictionary<object, object?>.Keys 79ICollection<object?> IDictionary<object, object?>.Values 84void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item) 89void ICollection<KeyValuePair<object, object?>>.Clear() 94bool ICollection<KeyValuePair<object, object?>>.Contains(KeyValuePair<object, object?> item) 99void ICollection<KeyValuePair<object, object?>>.CopyTo(KeyValuePair<object, object?>[] array, int arrayIndex) 104int ICollection<KeyValuePair<object, object?>>.Count 109bool ICollection<KeyValuePair<object, object?>>.IsReadOnly 114bool ICollection<KeyValuePair<object, object?>>.Remove(KeyValuePair<object, object?> item)
Features\IConnectionMetricsTagsFeature.cs (1)
16ICollection<KeyValuePair<string, object?>> Tags { get; }
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
Microsoft.AspNetCore.Diagnostics (5)
src\Shared\Metrics\MetricsExtensions.cs (5)
14var tags = feature.Tags; 21var tags = feature.Tags; 28var tags = feature.Tags; 33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
671public ICollection<KeyValuePair<string, object>> Tags => TagsList;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
246public ICollection<EndpointDataSource> DataSources { get; }
Microsoft.AspNetCore.HeaderParsing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.AspNetCore.Hosting (10)
GenericHost\GenericWebHostService.cs (1)
67var addresses = serverAddressesFeature?.Addresses;
Internal\HttpMetricsTagsFeature.cs (1)
10ICollection<KeyValuePair<string, object?>> IHttpMetricsTagsFeature.Tags => TagsList;
Internal\WebHost.cs (1)
262var addresses = serverAddressesFeature?.Addresses;
Server\Features\ServerAddressesFeature.cs (1)
14public ICollection<string> Addresses { get; } = new List<string>();
src\Shared\Metrics\MetricsExtensions.cs (5)
14var tags = feature.Tags; 21var tags = feature.Tags; 28var tags = feature.Tags; 33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags)
WebHostExtensions.cs (1)
120var serverAddresses = host.ServerFeatures.Get<IServerAddressesFeature>()?.Addresses;
Microsoft.AspNetCore.Hosting.Server.Abstractions (2)
Features\IServerAddressesFeature.cs (2)
12/// An <see cref="ICollection{T}" /> of addresses used by the server. 14ICollection<string> Addresses { get; }
Microsoft.AspNetCore.Hosting.Tests (4)
GenericWebHostBuilderTests.cs (1)
140public ICollection<string> Addresses { get; } = new List<string>();
HostingMetricsTests.cs (1)
182public ICollection<KeyValuePair<string, object>> Tags { get; } = new Collection<KeyValuePair<string, object>>();
WebHostTests.cs (2)
1394public ICollection<string> Keys => null; 1414public ICollection<StringValues> Values => null;
Microsoft.AspNetCore.Http (33)
FormCollection.cs (1)
93public ICollection<string> Keys
HeaderDictionary.cs (2)
163public ICollection<string> Keys 178public ICollection<StringValues> Values
Internal\ItemsDictionary.cs (10)
54ICollection<object> IDictionary<object, object?>.Keys 76ICollection<object?> IDictionary<object, object?>.Values 89void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item) 95void ICollection<KeyValuePair<object, object?>>.Clear() => _items?.Clear(); 97bool ICollection<KeyValuePair<object, object?>>.Contains(KeyValuePair<object, object?> item) 100void ICollection<KeyValuePair<object, object?>>.CopyTo(KeyValuePair<object, object?>[] array, int arrayIndex) 111int ICollection<KeyValuePair<object, object?>>.Count => _items?.Count ?? 0; 113bool ICollection<KeyValuePair<object, object?>>.IsReadOnly => _items?.IsReadOnly ?? false; 115bool ICollection<KeyValuePair<object, object?>>.Remove(KeyValuePair<object, object?> item) 164public static ICollection<KeyValuePair<object, object?>> Collection => Dictionary;
Internal\RequestCookieCollection.cs (1)
98public ICollection<string> Keys
QueryCollection.cs (1)
104public ICollection<string> Keys
QueryCollectionInternal.cs (1)
46public ICollection<string> Keys => Store.Keys;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (2)
55public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (4)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (11)
150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 153public ICollection<TKey> Keys 178public ICollection<TValue> Values 203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item); 264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item); 291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo( 314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex); 346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item);
Microsoft.AspNetCore.Http.Abstractions (7)
Routing\RouteValueDictionary.cs (7)
315bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 318public ICollection<string> Keys 338public ICollection<object?> Values 358void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 409bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 441void ICollection<KeyValuePair<string, object?>>.CopyTo( 482bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Http.Abstractions.Tests (22)
MapPathMiddlewareTests.cs (1)
258public ICollection<EndpointDataSource> DataSources => throw new NotImplementedException();
RouteValueDictionaryTests.cs (21)
432var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly; 734var keys = dict.Keys; 748var keys = dict.Keys; 765var keys = dict.Keys; 779var values = dict.Values; 793var values = dict.Values; 810var values = dict.Values; 941((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 1024var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1043var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1062var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1082var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1098var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1118var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1138var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1159var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1304((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1); 1329var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1349var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1369var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1390var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
Microsoft.AspNetCore.Http.Extensions (8)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImplementingCollectionBufferAdapter.cs (1)
7where TBuffer : TCollection, ICollection<TElement>, new()
src\Components\Endpoints\src\FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (1)
43where TCustomCollection : TCollection, ICollection<TElement>, new()
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (6)
65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 88var _ when type == (typeof(ICollection<TElement>)) => true, 164var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) 197var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) => 198CreateConverter<ICollection<TElement>, List<TElement>>(elementTypeConverter), 212where TImplementation : TInterface, ICollection<TElement>, new()
Microsoft.AspNetCore.Http.Extensions.Tests (3)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
482public ICollection<EndpointDataSource> DataSources { get; }
ValidationEndpointConventionBuilderExtensionsTests.cs (1)
75public ICollection<EndpointDataSource> DataSources { get; } = [];
ValidationFilterEndpointFactoryTests.cs (1)
180public ICollection<EndpointDataSource> DataSources { get; } = [];
Microsoft.AspNetCore.Http.Features (10)
IFormCollection.cs (3)
22/// Gets an <see cref="ICollection{T}" /> containing the keys of the 26/// An <see cref="ICollection{T}" /> containing the keys of the object 29ICollection<string> Keys { get; }
IHttpMetricsTagsFeature.cs (1)
14ICollection<KeyValuePair<string, object?>> Tags { get; }
IQueryCollection.cs (3)
22/// Gets an <see cref="ICollection{T}" /> containing the keys of the 26/// An <see cref="ICollection{T}" /> containing the keys of the object 29ICollection<string> Keys { get; }
IRequestCookieCollection.cs (3)
22/// Gets an <see cref="ICollection{T}" /> containing the keys of the 26/// An <see cref="ICollection{T}" /> containing the keys of the object 29ICollection<string> Keys { get; }
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
482public ICollection<EndpointDataSource> DataSources { get; }
Microsoft.AspNetCore.Http.Results (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
69var ranges = rangeHeader.Ranges;
Microsoft.AspNetCore.Http.Tests (2)
Internal\ItemsDictionaryTests.cs (2)
29ICollection<KeyValuePair<object, object>> cl = (ICollection<KeyValuePair<object, object>>)dict;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
Microsoft.AspNetCore.Identity.InMemory.Test (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
Microsoft.AspNetCore.Identity.Test (6)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
59public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (5)
136public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 140public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 144public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 148public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>(); 152public virtual ICollection<PocoUserPasskey<TKey>> Passkeys { get; private set; } = new List<PocoUserPasskey<TKey>>();
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (4)
TestObjectModels\DynamicTestObject.cs (2)
15public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys; 17public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
WriteOnceDynamicTestObject.cs (2)
29public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys; 31public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
Microsoft.AspNetCore.JsonPatch.Tests (4)
TestObjectModels\DynamicTestObject.cs (2)
15public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys; 17public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
WriteOnceDynamicTestObject.cs (2)
29public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys; 31public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\ModelMetadata.cs (2)
499/// A collection type is defined as a <see cref="Type"/> which is assignable to <see cref="ICollection{T}"/>. 780var collectionType = ClosedGenericMatcher.ExtractGenericInterface(ModelType, typeof(ICollection<>));
ModelBinding\Validation\ValidationStateDictionary.cs (2)
61public ICollection<object> Keys => ((IDictionary<object, ValidationStateEntry>)_inner).Keys; 64public ICollection<ValidationStateEntry> Values => ((IDictionary<object, ValidationStateEntry>)_inner).Values;
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (2)
58var results = CalculateStatusCodesToApply(context, declaredResponseMetadata); 169private static ICollection<(int statusCode, ITypeSymbol? typeSymbol)> CalculateStatusCodesToApply(in CodeActionContext context, IList<DeclaredApiResponseMetadata> declaredResponseMetadata)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
ApiResponseTypeProvider.cs (3)
30public ICollection<ApiResponseType> GetApiResponseTypes(ControllerActionDescriptor action) 54var apiResponseTypes = GetApiResponseTypes(responseMetadataAttributes, producesResponseMetadata, runtimeReturnType, defaultErrorType); 75private ICollection<ApiResponseType> GetApiResponseTypes(
DefaultApiDescriptionProvider.cs (1)
118var apiResponseTypes = _responseTypeProvider.GetApiResponseTypes(action);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (19)
ApiResponseTypeProviderTest.cs (18)
32var result = provider.GetApiResponseTypes(actionDescriptor); 97var result = provider.GetApiResponseTypes(actionDescriptor); 155var result = provider.GetApiResponseTypes(actionDescriptor); 212var result = provider.GetApiResponseTypes(actionDescriptor); 266var result = provider.GetApiResponseTypes(actionDescriptor); 305var result = provider.GetApiResponseTypes(actionDescriptor); 361var result = provider.GetApiResponseTypes(actionDescriptor); 404var result = provider.GetApiResponseTypes(actionDescriptor); 456var result = provider.GetApiResponseTypes(actionDescriptor); 499var result = provider.GetApiResponseTypes(actionDescriptor); 550var result = provider.GetApiResponseTypes(actionDescriptor); 596var result = provider.GetApiResponseTypes(actionDescriptor); 642var result = provider.GetApiResponseTypes(actionDescriptor); 692var result = provider.GetApiResponseTypes(actionDescriptor); 722var result = provider.GetApiResponseTypes(actionDescriptor); 748var result = provider.GetApiResponseTypes(actionDescriptor); 781var result = provider.GetApiResponseTypes(actionDescriptor); 821var result = provider.GetApiResponseTypes(actionDescriptor);
EndpointMetadataApiDescriptionProviderTest.cs (1)
1842public ICollection<EndpointDataSource> DataSources { get; }
Microsoft.AspNetCore.Mvc.Core (37)
Infrastructure\AsyncEnumerableReader.cs (3)
24/// This type is used to create a strongly typed synchronous <see cref="ICollection{T}"/> instance from 25/// an <see cref="IAsyncEnumerable{T}"/>. An accurate <see cref="ICollection{T}"/> is required for XML formatters to 47/// Attempts to produces a delegate that reads an <see cref="IAsyncEnumerable{T}"/> into an <see cref="ICollection{T}"/>.
ModelBinding\Binders\CollectionModelBinder.cs (3)
201typeof(ICollection<TElement>).IsAssignableFrom(targetType); 471var targetCollection = target as ICollection<TElement?>;
ModelBinding\Binders\CollectionModelBinderProvider.cs (2)
14/// An <see cref="IModelBinderProvider"/> for <see cref="ICollection{T}"/>. 32var collectionType = ClosedGenericMatcher.ExtractGenericInterface(modelType, typeof(ICollection<>));
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
64public ICollection<string> Keys => new List<string>();
ModelBinding\Binders\FormFileModelBinder.cs (2)
47ICollection<IFormFile> postedFiles; 138ICollection<IFormFile> postedFiles)
ModelBinding\Binders\HeaderModelBinder.cs (1)
179var collection = ModelBindingHelper.GetCompatibleCollection<string>(bindingContext, values.Length);
ModelBinding\ModelBindingHelper.cs (14)
451/// <typeparam name="T">The element type of the <see cref="ICollection{T}"/> required.</typeparam> 483if (model is ICollection<T> collection && !collection.IsReadOnly) 500typeof(ICollection<T>).IsAssignableFrom(modelType); 504/// Creates an <see cref="ICollection{T}"/> instance compatible with <paramref name="bindingContext"/>'s 507/// <typeparam name="T">The element type of the <see cref="ICollection{T}"/> required.</typeparam> 510/// An <see cref="ICollection{T}"/> instance compatible with <paramref name="bindingContext"/>'s 516public static ICollection<T> GetCompatibleCollection<T>(ModelBindingContext bindingContext) 522/// Creates an <see cref="ICollection{T}"/> instance compatible with <paramref name="bindingContext"/>'s 525/// <typeparam name="T">The element type of the <see cref="ICollection{T}"/> required.</typeparam> 531/// An <see cref="ICollection{T}"/> instance compatible with <paramref name="bindingContext"/>'s 537public static ICollection<T> GetCompatibleCollection<T>(ModelBindingContext bindingContext, int capacity) 542private static ICollection<T> GetCompatibleCollection<T>(ModelBindingContext bindingContext, int? capacity) 566if (model is ICollection<T> collection && !collection.IsReadOnly) 578return (ICollection<T>)Activator.CreateInstance(modelType)!;
ModelBinding\PrefixContainer.cs (2)
17private readonly ICollection<string> _originalValues; 24public PrefixContainer(ICollection<string> values)
ModelBinding\PropertyValueSetter.cs (2)
60var targetCollection = (ICollection<TElement>)target;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (2)
55public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (4)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\RangeHelper\RangeHelper.cs (1)
69var ranges = rangeHeader.Ranges;
Microsoft.AspNetCore.Mvc.Core.Test (31)
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
1832ICollection<IFormFile> formFileCollection,
ApplicationModels\InferParameterBindingInfoConventionTest.cs (1)
1025public IActionResult FromQueryOnCollectionType([FromQuery] ICollection<int> value) => null;
Controllers\ControllerBinderDelegateProviderTest.cs (5)
663ParameterType = typeof(ICollection<string>), 918typeof(ICollection<string>), 932typeof(ICollection<string>), 1369public ICollection<string> CollectionProperty { get; } = new List<string> { "goodbye" }; 1373public ICollection<string> NullCollectionProperty { get; private set; }
Formatters\JsonInputFormatterTestBase.cs (1)
282public virtual Task ReadAsync_ReadsValidArray_AsCollectionOfT() => ReadAsync_ReadsValidArray_AsList(typeof(ICollection<int>));
Infrastructure\AsyncEnumerableReaderTest.cs (6)
43var collection = Assert.IsAssignableFrom<ICollection<string>>(readCollection); 61var collection = Assert.IsAssignableFrom<ICollection<int>>(readCollection); 166var collection = Assert.IsAssignableFrom<ICollection<object>>(readCollection);
ModelBinding\Binders\CollectionModelBinderProviderTest.cs (1)
39[InlineData(typeof(ICollection<int>))]
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
429{ typeof(ICollection<int>), true },
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (1)
14[InlineData(typeof(ICollection<string>))]
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
593{ typeof(ICollection<KeyValuePair<int, int>>), true },
ModelBinding\Binders\FormFileModelBinderTest.cs (1)
249[InlineData(typeof(ICollection<IFormFile>))]
ModelBinding\Binders\HeaderModelBinderProviderTest.cs (1)
100[InlineData(typeof(ICollection<CarEnumType>))]
ModelBinding\Binders\HeaderModelBinderTests.cs (3)
62[InlineData(typeof(ICollection<string>))] 195[InlineData(typeof(ICollection<string>))] 301[InlineData(typeof(ICollection<CarType>), "a, b")]
ModelBinding\ModelBindingHelperTest.cs (7)
1337[InlineData(typeof(ICollection<int>))] 1361[InlineData(typeof(ICollection<int>))] 1370var result = ModelBindingHelper.GetCompatibleCollection<int>(bindingContext); 1386var result = ModelBindingHelper.GetCompatibleCollection<int>(bindingContext); 1399var result = ModelBindingHelper.GetCompatibleCollection<int>(bindingContext, capacity: 23); 1451var result = ModelBindingHelper.GetCompatibleCollection<int>(bindingContext); 1467var result = ModelBindingHelper.GetCompatibleCollection<int>(bindingContext);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (1)
884typeof(ICollection<DateTime>)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
EnumerableWrapperProviderTest.cs (1)
15[InlineData(typeof(ICollection<SerializableError>),
Microsoft.AspNetCore.Mvc.IntegrationTests (60)
ActionParametersIntegrationTest.cs (2)
1002private readonly ICollection<T> _original; 1009public CustomReadOnlyCollection(ICollection<T> original)
CollectionModelBinderIntegrationTest.cs (34)
111ParameterType = typeof(ICollection<int>) 404ParameterType = typeof(ICollection<Person2>) 499ParameterType = typeof(ICollection<Person2>) 697ParameterType = typeof(ICollection<Address5>), 740typeof(ICollection<string>), 853typeof(ICollection<string>), 1236int ICollection<string>.Count 1244bool ICollection<string>.IsReadOnly 1252void ICollection<string>.Add(string item) 1257void ICollection<string>.Clear() 1262bool ICollection<string>.Contains(string item) 1267void ICollection<string>.CopyTo(string[] array, int arrayIndex) 1282bool ICollection<string>.Remove(string item) 1305int ICollection<string>.Count 1313bool ICollection<string>.IsReadOnly 1321void ICollection<string>.Add(string item) 1326void ICollection<string>.Clear() 1331bool ICollection<string>.Contains(string item) 1336void ICollection<string>.CopyTo(string[] array, int arrayIndex) 1361bool ICollection<string>.Remove(string item) 1376int ICollection<T>.Count 1384bool ICollection<T>.IsReadOnly 1392void ICollection<T>.Add(T item) 1397void ICollection<T>.Clear() 1402bool ICollection<T>.Contains(T item) 1407void ICollection<T>.CopyTo(T[] array, int arrayIndex) 1422bool ICollection<T>.Remove(T item) 1445int ICollection<T>.Count 1453bool ICollection<T>.IsReadOnly 1461void ICollection<T>.Add(T item) 1466void ICollection<T>.Clear() 1471bool ICollection<T>.Contains(T item) 1476void ICollection<T>.CopyTo(T[] array, int arrayIndex) 1501bool ICollection<T>.Remove(T item)
DictionaryModelBinderIntegrationTest.cs (18)
1533int ICollection<KeyValuePair<string, string>>.Count 1541bool ICollection<KeyValuePair<string, string>>.IsReadOnly 1549ICollection<string> IDictionary<string, string>.Keys 1557ICollection<string> IDictionary<string, string>.Values 1565void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> item) 1575void ICollection<KeyValuePair<string, string>>.Clear() 1580bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> item) 1590void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] array, int arrayIndex) 1605bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> item) 1638int ICollection<KeyValuePair<TKey, TValue>>.Count 1646bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 1654ICollection<TKey> IDictionary<TKey, TValue>.Keys 1662ICollection<TValue> IDictionary<TKey, TValue>.Values 1670void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 1680void ICollection<KeyValuePair<TKey, TValue>>.Clear() 1685bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 1695void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 1710bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
GenericModelBinderIntegrationTest.cs (3)
391ParameterType = typeof(ICollection<KeyValuePair<string, int>>) 435ParameterType = typeof(ICollection<KeyValuePair<string, int>>) 479ParameterType = typeof(ICollection<KeyValuePair<string, int>>)
TryUpdateModelIntegrationTest.cs (3)
582public ICollection<Address> Address { get; } = new Address[] 1293private readonly ICollection<T> _original; 1300public CustomReadOnlyCollection(ICollection<T> original)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (3)
24/// This type is used to create a strongly typed synchronous <see cref="ICollection{T}"/> instance from 25/// an <see cref="IAsyncEnumerable{T}"/>. An accurate <see cref="ICollection{T}"/> is required for XML formatters to 47/// Attempts to produces a delegate that reads an <see cref="IAsyncEnumerable{T}"/> into an <see cref="ICollection{T}"/>.
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (1)
282public virtual Task ReadAsync_ReadsValidArray_AsCollectionOfT() => ReadAsync_ReadsValidArray_AsList(typeof(ICollection<int>));
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (6)
43var collection = Assert.IsAssignableFrom<ICollection<string>>(readCollection); 61var collection = Assert.IsAssignableFrom<ICollection<int>>(readCollection); 166var collection = Assert.IsAssignableFrom<ICollection<object>>(readCollection);
Microsoft.AspNetCore.Mvc.Razor (2)
TagHelperComponentManager.cs (1)
26public ICollection<ITagHelperComponent> Components { get; }
TagHelpers\ITagHelperComponentManager.cs (1)
18ICollection<ITagHelperComponent> Components { get; }
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (3)
166var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 192var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 232public ICollection<EndpointDataSource> DataSources { get; } = [];
Microsoft.AspNetCore.Mvc.TagHelpers (4)
CurrentValues.cs (3)
10public CurrentValues(ICollection<string> values) 16public ICollection<string> Values { get; } 18public ICollection<string> ValuesAndEncodedValues { get; set; }
SelectTagHelper.cs (1)
24private ICollection<string> _currentValues;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
OptionTagHelperTest.cs (6)
13public static TheoryData<string, string, string, ICollection<string>, TagHelperOutput> GeneratesExpectedDataSet 17return new TheoryData<string, string, string, ICollection<string>, TagHelperOutput> 358entry => (entry[1] != null || entry[3] == null || ((ICollection<string>)(entry[3])).Count == 0)); 379ICollection<string> currentValues, 451ICollection<string> currentValues, 515ICollection<string> _,
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
AttributeDictionary.cs (2)
63public ICollection<string> Keys => new KeyCollection(this); 66public ICollection<string?> Values => new ValueCollection(this);
DefaultHtmlGenerator.cs (5)
516var currentValues = GetCurrentValues(viewContext, modelExplorer, expression, allowMultiple); 535ICollection<string> currentValues, 900public virtual ICollection<string> GetCurrentValues( 1556ICollection<string> currentValues) 1640private static IHtmlContent GenerateOption(SelectListItem item, ICollection<string> currentValues)
IHtmlGenerator.cs (4)
416/// An <see cref="ICollection{String}"/> containing values for &lt;option&gt; elements to select. If 446ICollection<string> currentValues, 576/// <see cref="ICollection{String}"/> containing current values for the given 594ICollection<string> GetCurrentValues(
Infrastructure\DefaultTempDataSerializer.cs (4)
182case ICollection<int> intCollection: 191case ICollection<string> stringCollection: 230typeof(ICollection<int>).IsAssignableFrom(type) || 231typeof(ICollection<string>).IsAssignableFrom(type) ||
TempDataDictionary.cs (12)
55public ICollection<string> Keys 65public ICollection<object?> Values 75bool ICollection<KeyValuePair<string, object?>>.IsReadOnly 80return ((ICollection<KeyValuePair<string, object?>>)_data).IsReadOnly; 242void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int index) 245((ICollection<KeyValuePair<string, object?>>)_data).CopyTo(array, index); 248void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> keyValuePair) 252((ICollection<KeyValuePair<string, object?>>)_data).Add(keyValuePair); 255bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> keyValuePair) 258return ((ICollection<KeyValuePair<string, object?>>)_data).Contains(keyValuePair); 261bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> keyValuePair) 265return ((ICollection<KeyValuePair<string, object?>>)_data).Remove(keyValuePair);
ViewDataDictionary.cs (2)
332public ICollection<string> Keys 338public ICollection<object?> Values
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (17)
AttributeDictionaryTest.cs (2)
196var keys = attributes.Keys; 348var values = attributes.Values;
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (3)
221var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 256var groupEndpoints = Assert.IsAssignableFrom<IEndpointRouteBuilder>(group).DataSources; 305public ICollection<EndpointDataSource> DataSources { get; } = [];
DefaultHtmlGeneratorTest.cs (12)
35var result = htmlGenerator.GetCurrentValues( 57var result = htmlGenerator.GetCurrentValues( 502var result = htmlGenerator.GetCurrentValues( 593var result = htmlGenerator.GetCurrentValues( 623var result = htmlGenerator.GetCurrentValues( 671var result = htmlGenerator.GetCurrentValues( 697var result = htmlGenerator.GetCurrentValues( 720var result = htmlGenerator.GetCurrentValues( 778var result = htmlGenerator.GetCurrentValues( 804var result = htmlGenerator.GetCurrentValues( 833var result = htmlGenerator.GetCurrentValues( 945var result = htmlGenerator.GetCurrentValues(
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentServiceTestsBase.cs (2)
190public ICollection<EndpointDataSource> DataSources { get; } 365public ICollection<string> Addresses { get; set; }
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
366public ICollection<Todo> Todos { get; set; } = [];
Microsoft.AspNetCore.Owin (27)
DictionaryStringArrayWrapper.cs (9)
32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count; 34bool ICollection<KeyValuePair<string, string[]>>.IsReadOnly => Inner.IsReadOnly; 36ICollection<string> IDictionary<string, string[]>.Keys => Inner.Keys; 38ICollection<string[]> IDictionary<string, string[]>.Values => Inner.Values.Select(Convert).ToList(); 40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item)); 44void ICollection<KeyValuePair<string, string[]>>.Clear() => Inner.Clear(); 46bool ICollection<KeyValuePair<string, string[]>>.Contains(KeyValuePair<string, string[]> item) => Inner.Contains(Convert(item)); 50void ICollection<KeyValuePair<string, string[]>>.CopyTo(KeyValuePair<string, string[]>[] array, int arrayIndex) 64bool ICollection<KeyValuePair<string, string[]>>.Remove(KeyValuePair<string, string[]> item) => Inner.Remove(Convert(item));
DictionaryStringValuesWrapper.cs (9)
77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count; 79bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => Inner.IsReadOnly; 81ICollection<string> IDictionary<string, StringValues>.Keys => Inner.Keys; 83ICollection<StringValues> IDictionary<string, StringValues>.Values => Inner.Values.Select(Convert).ToList(); 85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item)); 89void ICollection<KeyValuePair<string, StringValues>>.Clear() => Inner.Clear(); 91bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) => Inner.Contains(Convert(item)); 95void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 109bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item));
OwinEnvironment.cs (9)
84ICollection<string> IDictionary<string, object>.Keys 108ICollection<object> IDictionary<string, object>.Values 161void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 166void ICollection<KeyValuePair<string, object>>.Clear() 172bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 177void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 193int ICollection<KeyValuePair<string, object>>.Count 198bool ICollection<KeyValuePair<string, object>>.IsReadOnly 203bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Owin.Tests (2)
OwinEnvironmentTests.cs (2)
142var collection = (ICollection<KeyValuePair<string, object>>)owinEnvironment;
Microsoft.AspNetCore.Razor (1)
TagHelpers\TagHelperAttributeList.cs (1)
121bool ICollection<TagHelperAttribute>.IsReadOnly => false;
Microsoft.AspNetCore.Razor.Runtime (6)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (2)
55public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (4)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
Microsoft.AspNetCore.Razor.Test (2)
TagHelpers\TagHelperAttributeListTest.cs (2)
219var attributes = new TagHelperAttributeList() as ICollection<TagHelperAttribute>;
Microsoft.AspNetCore.Routing (13)
Builder\RouteHandlerBuilder.cs (4)
12private readonly ICollection<Action<EndpointBuilder>>? _conventions; 13private readonly ICollection<Action<EndpointBuilder>>? _finallyConventions; 15internal RouteHandlerBuilder(ICollection<Action<EndpointBuilder>> conventions, ICollection<Action<EndpointBuilder>> finallyConventions)
CompositeEndpointDataSource.cs (1)
20private readonly ICollection<EndpointDataSource> _dataSources;
ConfigureRouteOptions.cs (2)
11private readonly ICollection<EndpointDataSource> _dataSources; 13public ConfigureRouteOptions(ICollection<EndpointDataSource> dataSources)
DefaultEndpointRouteBuilder.cs (1)
20public ICollection<EndpointDataSource> DataSources { get; }
IEndpointRouteBuilder.cs (1)
28ICollection<EndpointDataSource> DataSources { get; }
RouteEndpointDataSource.cs (1)
370void ICollection<Action<EndpointBuilder>>.Add(Action<EndpointBuilder> convention)
RouteGroupBuilder.cs (1)
36ICollection<EndpointDataSource> IEndpointRouteBuilder.DataSources => _dataSources;
RouteOptions.cs (2)
25private ICollection<EndpointDataSource> _endpointDataSources = default!; 30internal ICollection<EndpointDataSource> EndpointDataSources
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingShortCircuitBenchmark.cs (1)
102public ICollection<EndpointDataSource> DataSources => new List<EndpointDataSource>();
Microsoft.AspNetCore.Server.HttpSys (12)
MessagePump.Log.cs (2)
23public static void ClearedAddresses(ILogger logger, ICollection<string> serverAddresses) 37public static void ClearedPrefixes(ILogger logger, ICollection<string> serverAddresses)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (2)
108public ICollection<string> Keys 113public ICollection<StringValues> Values
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (8)
89public ICollection<string> Keys 110ICollection<StringValues> IDictionary<string, StringValues>.Values 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Listener\ResponseHeaderTests.cs (1)
323((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (2)
RequestHeaderBenchmarks.cs (2)
41public ICollection<string> KeysSingleHeader() 48public ICollection<string> KeysLargeHeaders()
Microsoft.AspNetCore.Server.IIS (11)
Core\ServerAddressesFeature.cs (1)
10public ICollection<string> Addresses { get; set; } = Array.Empty<string>();
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (2)
108public ICollection<string> Keys 113public ICollection<StringValues> Values
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (8)
89public ICollection<string> Keys 110ICollection<StringValues> IDictionary<string, StringValues>.Values 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.Server.Kestrel.Core (22)
Internal\AddressBindContext.cs (1)
23public ICollection<string> Addresses => ServerAddressesFeature.InternalCollection;
Internal\Http\HttpHeaders.cs (8)
117bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => _isReadOnly; 119ICollection<string> IDictionary<string, StringValues>.Keys => ((IDictionary<string, StringValues>)this).Select(pair => pair.Key).ToHashSet(StringComparer.OrdinalIgnoreCase); 121ICollection<StringValues> IDictionary<string, StringValues>.Values => ((IDictionary<string, StringValues>)this).Select(pair => pair.Value).ToList(); 184void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 206void ICollection<KeyValuePair<string, StringValues>>.Clear() 215bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 227void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 245bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Internal\Http\HttpHeaders.Generated.cs (3)
7472((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex); 14799((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex); 17567((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex);
Internal\Infrastructure\KestrelConnectionOfT.cs (1)
103ICollection<KeyValuePair<string, object?>> IConnectionMetricsTagsFeature.Tags => TagsList;
Internal\ServerAddressesCollection.cs (1)
23public ICollection<string> PublicCollection => _publicCollection;
Internal\ServerAddressesFeature.cs (1)
16ICollection<string> IServerAddressesFeature.Addresses => InternalCollection.PublicCollection;
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
src\Shared\Metrics\MetricsExtensions.cs (5)
14var tags = feature.Tags; 21var tags = feature.Tags; 28var tags = feature.Tags; 33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Http1\Http1ConnectionTests.cs (2)
1200public ICollection<string> Keys => _innerHeaders.Keys; 1201public ICollection<StringValues> Values => _innerHeaders.Values;
HttpResponseHeadersTests.cs (3)
128((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 222((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 254((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Http2\Http2ConnectionBenchmarkBase.cs (1)
200public ICollection<KeyValuePair<string, object>> Tags { get; }
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1040public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
Microsoft.AspNetCore.Session (4)
DefaultDistributedSessionStore.cs (1)
15public ICollection<EncodedKey> Keys => _store.Keys;
IDistributedSessionStore.cs (1)
12ICollection<EncodedKey> Keys { get; }
NoOpSessionStore.cs (2)
20public ICollection<EncodedKey> Keys { get; } = Array.Empty<EncodedKey>(); 22public ICollection<byte[]> Values { get; } = Array.Empty<byte[]>();
Microsoft.AspNetCore.Shared.Tests (61)
AdaptiveCapacityDictionaryTests.cs (15)
94var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly; 293var keys = dict.Keys; 310var keys = dict.Keys; 324var values = dict.Values; 341var values = dict.Values; 447((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 500var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 519var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 538var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 558var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 654((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1); 679var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 699var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 719var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 740var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
ClosedGenericMatcherTest.cs (18)
39typeof(ICollection<BaseClass>), 66typeof(ICollection<>), 67typeof(ICollection<KeyValuePair<string, object>>) 82typeof(ICollection<>), 83typeof(ICollection<KeyValuePair<string, object>>) 98typeof(ICollection<>), 99typeof(ICollection<KeyValuePair<string, object>>) 109typeof(ICollection<>), 110typeof(ICollection<BaseClass>) 251int ICollection<KeyValuePair<string, object>>.Count 259bool ICollection<KeyValuePair<string, object>>.IsReadOnly 267ICollection<string> IDictionary<string, object>.Keys 275ICollection<object> IDictionary<string, object>.Values 288void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 298void ICollection<KeyValuePair<string, object>>.Clear() 303bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 313void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 328bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
PropertyHelperTest.cs (1)
292var helpers = PropertyHelper.GetProperties(typeof(ICollection<string>));
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (2)
55public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (4)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (11)
150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 153public ICollection<TKey> Keys 178public ICollection<TValue> Values 203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item); 264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item); 291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo( 314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex); 346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (2)
108public ICollection<string> Keys 113public ICollection<StringValues> Values
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (8)
89public ICollection<string> Keys 110ICollection<StringValues> IDictionary<string, StringValues>.Values 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.SignalR.Core (1)
Internal\HubGroupList.cs (1)
40((ICollection<KeyValuePair<string, GroupConnectionList>>)(_groups)).Remove(groupToRemove);
Microsoft.AspNetCore.StaticAssets (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
69var ranges = rangeHeader.Ranges;
Microsoft.AspNetCore.StaticFiles (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
69var ranges = rangeHeader.Ranges;
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
69var ranges = rangeHeader.Ranges;
Microsoft.AspNetCore.Testing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
3091private readonly ICollection<string> _urls; 3098public MockAddressesServer(ICollection<string> urls) 3135public ICollection<string> Addresses { get; set; }
Microsoft.Build.Framework (9)
BinaryTranslator.cs (4)
377public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T> 1178public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T>
BuildCheck\EnumerableExtensions.cs (1)
52public static HashSet<T>? ToHashSet<T>(this ICollection<T>? source, IEqualityComparer<T>? equalityComparer = null)
ITranslator.cs (2)
211void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T>;
ProjectStartedEventArgs.cs (1)
479private static void WriteCollection(BinaryWriter writer, ICollection<string>? collection)
ReuseableStringBuilder.cs (1)
143public ReuseableStringBuilder AppendSeparated(char separator, ICollection<string> strings)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (9)
TargetTests.cs (9)
165var items = instance.GetItems("_GeneratedEditorConfigProperty"); 198var items = instance.GetItems("_GeneratedEditorConfigProperty"); 227var items = instance.GetItems("_GeneratedEditorConfigProperty"); 259var items = instance.GetItems("_GeneratedEditorConfigMetadata"); 301var items = instance.GetItems("_GeneratedEditorConfigMetadata"); 341var items = instance.GetItems("_GeneratedEditorConfigMetadata"); 376var items = instance.GetItems("_GeneratedEditorConfigMetadata"); 538var items = instance.GetItems("EditorConfigFiles"); 830var items = instance.GetItems("CustomAdditionalCompileInputs");
Microsoft.Cci.Extensions (14)
Experimental\APIClosureTypeReferenceVisitor.cs (4)
17private readonly ICollection<ITypeReference> _typeReferences; 18private readonly ICollection<IAssemblyReference> _assemblyReferences; 26public ICollection<ITypeReference> TypeReferences { get { return _typeReferences; } } 28public ICollection<IAssemblyReference> AssemblyReferences { get { return _assemblyReferences; } }
Experimental\TypeReferenceSearcher.cs (2)
57private readonly ICollection<TypeReferenceDependency> _dependencies; 64public ICollection<TypeReferenceDependency> Dependencies { get { return _dependencies; } }
Experimental\TypeReferenceVisitor.cs (4)
17private readonly ICollection<ITypeReference> _typeReferences; 18private readonly ICollection<IAssemblyReference> _assemblyReferences; 26public ICollection<ITypeReference> TypeReferences { get { return _typeReferences; } } 28public ICollection<IAssemblyReference> AssemblyReferences { get { return _assemblyReferences; } }
HostEnvironment.cs (1)
54public ICollection<UnresolvedReference<IUnit, AssemblyIdentity>> UnresolvedIdentities { get { return _unresolvedIdentities; } }
TypeDependencies.cs (3)
15private ICollection<ITypeReference> _publicDependents; 16private ICollection<ITypeReference> _dependents; 17private ICollection<IMethodReference> _methodDependents;
Microsoft.CodeAnalysis (149)
Binding\AbstractLookupSymbolsInfo.cs (1)
269public ICollection<String> Names => _nameMap.Keys;
Binding\BindingDiagnosticBag.cs (3)
62public readonly ICollection<TAssemblySymbol>? DependenciesBag; 64protected BindingDiagnosticBag(DiagnosticBag? diagnosticBag, ICollection<TAssemblySymbol>? dependenciesBag) 140internal void AddDependencies(ICollection<TAssemblySymbol>? dependencies)
Binding\UseSiteInfo.cs (2)
260public void AddDiagnostics(ICollection<DiagnosticInfo>? diagnostics) 361public void AddDependencies(ICollection<TAssemblySymbol>? dependencies)
Collections\CollectionsExtensions.cs (1)
13internal static bool IsNullOrEmpty<T>([NotNullWhen(returnValue: false)] this ICollection<T>? collection)
Collections\IdentifierCollection.cs (2)
133public ICollection<string> AsCaseSensitiveCollection() 138public ICollection<string> AsCaseInsensitiveCollection()
Collections\UnionCollection.cs (9)
28private readonly ImmutableArray<ICollection<T>> _collections; 31public static ICollection<T> Create(ICollection<T> coll1, ICollection<T> coll2) 49public static ICollection<T> Create<TOrig>(ImmutableArray<TOrig> collections, Func<TOrig, ICollection<T>> selector) 66private UnionCollection(ImmutableArray<ICollection<T>> collections) 86foreach (var c in _collections) 100foreach (var collection in _collections)
Compilation\Compilation.cs (2)
3047ICollection<MethodDefinitionHandle> updatedMethods, 3068ICollection<MethodDefinitionHandle> updatedMethods,
InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
SpecialType.cs (1)
161/// Indicates that the type is <see cref="ICollection{T}"/>.
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Symbols\IAssemblySymbol.cs (2)
46ICollection<string> TypeNames { get; } 51ICollection<string> NamespaceNames { get; }
Syntax\SyntaxList`1.cs (2)
87var collection = nodes as ICollection<TNode>;
Syntax\SyntaxTriviaList.cs (2)
331var triviaCollection = trivia as ICollection<SyntaxTrivia>;
Microsoft.CodeAnalysis.Analyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.AnalyzerUtilities (133)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
4191/// 2. <see cref="INamedTypeSymbol"/> for <see cref="System.Collections.Generic.ICollection{T}"/>
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (2)
53public ICollection<TKey> Keys 62public ICollection<TValue> Values =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.BannedApiAnalyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.CodeStyle (131)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
35protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation operation); 120var missingEnumMembers = GetMissingEnumMembers(operation);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
16public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
55public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchStatement)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
38protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation switchOperation);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
45protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation switchOperation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
62protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchOperation)
Microsoft.CodeAnalysis.Collections.Package (121)
Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Microsoft.CodeAnalysis.CSharp (43)
Binder\BindingDiagnosticBag.cs (2)
24private BindingDiagnosticBag(DiagnosticBag? diagnosticBag, ICollection<AssemblySymbol>? dependenciesBag) 29private BindingDiagnosticBag(ObjectPool<BindingDiagnosticBag> pool, DiagnosticBag? diagnosticBag, ICollection<AssemblySymbol>? dependenciesBag)
Declarations\DeclarationTable.cs (8)
41private ICollection<string>? _typeNames; 42private ICollection<string>? _namespaceNames; 43private ICollection<ReferenceDirective>? _referenceDirectives; 159private ICollection<string> GetMergedTypeNames() 173private ICollection<string> GetMergedNamespaceNames() 187private ICollection<ReferenceDirective> GetMergedReferenceDirectives() 242public ICollection<string> TypeNames 253public ICollection<string> NamespaceNames
Declarations\MergedTypeDeclaration.cs (3)
26private ICollection<string> _lazyMemberNames; 256public ICollection<string> MemberNames 262var names = UnionCollection<string>.Create(this.Declarations, d => d.MemberNames.Value);
Symbols\AssemblySymbol.cs (2)
584public abstract ICollection<string> TypeNames { get; } 589public abstract ICollection<string> NamespaceNames { get; }
Symbols\Compilation_UsedAssemblies.cs (1)
224internal void AddUsedAssemblies(ICollection<AssemblySymbol>? assemblies)
Symbols\Metadata\PE\PEModuleSymbol.cs (4)
94private ICollection<string> _lazyTypeNames; 97private ICollection<string> _lazyNamespaceNames; 503internal override ICollection<string> TypeNames 516internal override ICollection<string> NamespaceNames
Symbols\Metadata\PE\PENamedTypeSymbol.cs (3)
46private ICollection<string> _lazyMemberNames; 1047private static ICollection<string> CreateReadOnlyMemberNames(HashSet<string> names) 1676var memberNames = SpecializedCollections.ReadOnlyCollection(membersDict.Keys);
Symbols\MetadataOrSourceAssemblySymbol.cs (4)
119private ICollection<string> _lazyTypeNames; 120private ICollection<string> _lazyNamespaceNames; 122public override ICollection<string> TypeNames 159public override ICollection<string> NamespaceNames
Symbols\MissingAssemblySymbol.cs (2)
153public override ICollection<string> TypeNames 161public override ICollection<string> NamespaceNames
Symbols\MissingModuleSymbol.cs (2)
131internal override ICollection<string> NamespaceNames 139internal override ICollection<string> TypeNames
Symbols\ModuleSymbol.cs (2)
306internal abstract ICollection<string> TypeNames { get; } 308internal abstract ICollection<string> NamespaceNames { get; }
Symbols\PublicModel\AssemblySymbol.cs (2)
44ICollection<string> IAssemblySymbol.TypeNames => UnderlyingAssemblySymbol.TypeNames; 46ICollection<string> IAssemblySymbol.NamespaceNames => UnderlyingAssemblySymbol.NamespaceNames;
Symbols\Retargeting\RetargetingAssemblySymbol.cs (2)
256public override ICollection<string> TypeNames 264public override ICollection<string> NamespaceNames
Symbols\Retargeting\RetargetingModuleSymbol.cs (2)
260internal override ICollection<string> TypeNames 268internal override ICollection<string> NamespaceNames
Symbols\Source\SourceModuleSymbol.cs (2)
475internal override ICollection<string> TypeNames 483internal override ICollection<string> NamespaceNames
Syntax\SyntaxFactory.cs (2)
1360var collection = nodes as ICollection<TNode>;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
52nameof(ICollection<>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
52nameof(ICollection<>),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LookupTests.cs (1)
433var actual_lookupNames = info.Names;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\MockAssemblySymbol.cs (2)
102public override ICollection<string> TypeNames 110public override ICollection<string> NamespaceNames
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
1063public override void TryAddPossibleNameConflicts(ISymbol symbol, string replacementText, ICollection<string> possibleNameConflicts)
Microsoft.CodeAnalysis.EditorFeatures (2)
ExternalAccess\VSTypeScript\Api\VSTypeScriptAsynchronousTaggerProvider.cs (1)
57protected abstract bool TryAddSpansToTagImpl(ITextView? textView, ITextBuffer subjectBuffer, ICollection<SnapshotSpan> result);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_TagsChanged.cs (1)
24ICollection<KeyValuePair<ITextBuffer, DiffResult>> changes, bool highPriority)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
161/// Indicates that the type is <see cref="ICollection{T}"/>.
Microsoft.CodeAnalysis.Extensions.Package (122)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.Features (9)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
35protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation operation); 120var missingEnumMembers = GetMissingEnumMembers(operation);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
16public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
55public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchStatement)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
38protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation switchOperation);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
45protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation switchOperation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
62protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchOperation)
Microsoft.CodeAnalysis.InteractiveHost (121)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Microsoft.CodeAnalysis.LanguageServer (2)
Testing\TestRunner.TestRunHandler.cs (2)
42public void HandleTestRunComplete(TestRunCompleteEventArgs testRunCompleteArgs, TestRunChangedEventArgs? lastChunkArgs, ICollection<AttachmentSet>? runContextAttachments, ICollection<string>? executorUris)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.PublicApiAnalyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.ResxSourceGenerator (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.Threading.Package (121)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Microsoft.CodeAnalysis.UnitTests (85)
Collections\HashSet\ISet_Generic_Tests`1.cs (4)
53protected override void AddToCollection(ICollection<T> collection, int numberOfItemsToAdd) 72protected override ICollection<T> GenericICollectionFactory() => GenericISetFactory(); 74protected override ICollection<T> GenericICollectionFactory(int count) => GenericISetFactory(count); 110ICollection<T> collection = GenericICollectionFactory(count);
Collections\IdentifierCollectionTests.cs (7)
38var idcol = new IdentifierCollection(strings).AsCaseSensitiveCollection(); 55var idcol = new IdentifierCollection(strings).AsCaseInsensitiveCollection(); 78private void TestReadOnly(ICollection<string> collection) 86private void AssertContains(ICollection<string> collection, params string[] strings) 91private void AssertContains(ICollection<string> collection, IEnumerable<string> strings) 99private void AssertNotContains(ICollection<string> collection, params string[] strings) 104private void AssertNotContains(ICollection<string> collection, IEnumerable<string> strings)
Collections\ImmutableDictionaryTestBase.cs (2)
130var dictionary = (ICollection<KeyValuePair<string, int>>)Empty<string, int>();
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (1)
284private static void KeysOrValuesTestHelper<T>(ICollection<T> collection, T containedValue)
Collections\ImmutableSegmentedHashSetBuilderTest.cs (1)
276ICollection<string> builder = ImmutableSegmentedHashSet.Create("a").ToBuilder();
Collections\ImmutableSegmentedListBuilderTest.cs (2)
249ICollection<int> builder = ImmutableSegmentedList.Create<int>().ToBuilder(); 296ICollection<int> builder = ImmutableSegmentedList.Create<int>().ToBuilder();
Collections\ImmutableSetTest.cs (2)
182var set = (ICollection<int>)this.Empty<int>();
Collections\ImmutablesTestBase.cs (2)
44internal static void CollectionAssertAreEquivalent<T>(ICollection<T> expected, ICollection<T> actual)
Collections\List\CollectionAsserts.cs (4)
46public static void Equal<T>(ICollection<T> expected, ICollection<T> actual) 91public static void EqualUnordered<T>(ICollection<T> expected, ICollection<T> actual)
Collections\List\ICollection.Generic.Tests.cs (49)
33protected abstract ICollection<T> GenericICollectionFactory(); 40protected virtual ICollection<T> GenericICollectionFactory(int count) 42ICollection<T> collection = GenericICollectionFactory(); 55protected virtual void AddToCollection(ICollection<T> collection, int numberOfItemsToAdd) 88var casted = (ICollection<T>)enumerable; 97var casted = (ICollection<T>)enumerable; 110var casted = (ICollection<T>)enumerable; 129ICollection<T> collection = GenericICollectionFactory(count); 141ICollection<T> collection = GenericICollectionFactory(count); 155ICollection<T?> collection = GenericICollectionFactory(count)!; 169ICollection<T> collection = GenericICollectionFactory(count); 186ICollection<T> collection = GenericICollectionFactory(0); 203ICollection<T> collection = GenericICollectionFactory(count); 216ICollection<T> collection = GenericICollectionFactory(count); 230ICollection<T> collection = GenericICollectionFactory(count); 244ICollection<T> collection = GenericICollectionFactory(count); 268ICollection<T> collection = GenericICollectionFactory(count); 283ICollection<T> collection = GenericICollectionFactory(count); 296ICollection<T> collection = GenericICollectionFactory(count); 314ICollection<T> collection = GenericICollectionFactory(count); 331ICollection<T> collection = GenericICollectionFactory(count); 358ICollection<T> collection = GenericICollectionFactory(); 369WeakReference<object> populateAndRemove(ICollection<T> collection, bool useRemove) 396ICollection<T> collection = GenericICollectionFactory(count); 408ICollection<T> collection = GenericICollectionFactory(count); 417ICollection<T> collection = GenericICollectionFactory(count); 430ICollection<T?> collection = GenericICollectionFactory(count)!; 442ICollection<T> collection = GenericICollectionFactory(count); 454ICollection<T> collection = GenericICollectionFactory(count); 466ICollection<T> collection = GenericICollectionFactory(count); 482ICollection<T> collection = GenericICollectionFactory(count); 490ICollection<T> collection = GenericICollectionFactory(count); 500ICollection<T> collection = GenericICollectionFactory(count); 512ICollection<T> collection = GenericICollectionFactory(count); 523ICollection<T> collection = GenericICollectionFactory(count); 533ICollection<T> collection = GenericICollectionFactory(count); 543ICollection<T> collection = GenericICollectionFactory(count); 559ICollection<T> collection = GenericICollectionFactory(count); 571ICollection<T?> collection = GenericICollectionFactory(count)!; 590ICollection<T> collection = GenericICollectionFactory(count); 606ICollection<T?> collection = GenericICollectionFactory(count)!; 625ICollection<T> collection = GenericICollectionFactory(count); 644ICollection<T> collection = GenericICollectionFactory(count); 661ICollection<T> collection = GenericICollectionFactory(count); 674ICollection<T> collection = GenericICollectionFactory(count); 688ICollection<T> collection = GenericICollectionFactory(count);
Collections\List\IList.Generic.Tests.cs (2)
100protected override ICollection<T> GenericICollectionFactory() => GenericIListFactory(); 102protected override ICollection<T> GenericICollectionFactory(int count) => GenericIListFactory(count);
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
149ICollection<T> collection = new CollectionWithLargeCount();
Collections\SegmentedArrayTests.cs (7)
60Assert.Equal(0, ((ICollection<IntPtr>)data).Count); 65Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).CopyTo(Array.Empty<IntPtr>(), 0)); 77Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Add(IntPtr.Zero)); 78Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Clear()); 82Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Remove(IntPtr.Zero)); 88Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).Contains(IntPtr.Zero)); 132Assert.Equal(length, ((ICollection<IntPtr>)data).Count);
InternalUtilities\SpecializedCollectionsTests.cs (1)
40Assert.Throws<NotSupportedException>(() => ((ICollection<int>)(emptySet)).Add(0));
Microsoft.CodeAnalysis.VisualBasic (8)
Declarations\MergedTypeDeclaration.vb (2)
25Private _memberNames As ICollection(Of String) 175Public ReadOnly Property MemberNames As ICollection(Of String)
Symbols\AssemblySymbol.vb (2)
461Public MustOverride ReadOnly Property TypeNames As ICollection(Of String) Implements IAssemblySymbol.TypeNames 463Public MustOverride ReadOnly Property NamespaceNames As ICollection(Of String) Implements IAssemblySymbol.NamespaceNames
Symbols\Retargeting\RetargetingAssemblySymbol.vb (2)
221Public Overrides ReadOnly Property TypeNames As ICollection(Of String) 227Public Overrides ReadOnly Property NamespaceNames As ICollection(Of String)
Symbols\Retargeting\RetargetingModuleSymbol.vb (2)
241Friend Overrides ReadOnly Property TypeNames As ICollection(Of String) 247Friend Overrides ReadOnly Property NamespaceNames As ICollection(Of String)
Microsoft.CodeAnalysis.Workspaces (127)
Rename\IRenameRewriterLanguageService.cs (2)
38ICollection<string> possibleNameConflicts); 130public abstract void TryAddPossibleNameConflicts(ISymbol symbol, string newName, ICollection<string> possibleNameConflicts);
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (128)
Build\ProjectBuildManager.cs (1)
89var loadedProjects = projectCollection?.GetLoadedProjects(path);
MSBuild\ProjectFile\Extensions.cs (1)
38var packageReferenceItems = executedProject.GetItems(ItemNames.PackageReference);
MSBuild\ProjectFile\ProjectFile.cs (4)
392var items = _loadedProject.GetItems(ItemNames.Compile); 436var references = _loadedProject.GetItems(ItemNames.Reference); 517var references = _loadedProject.GetItems(ItemNames.ProjectReference); 552var analyzers = _loadedProject.GetItems(ItemNames.Analyzer);
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
168|| genType == typeof(ICollection<>)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
158new PredefinedTypeInfo(PredefinedType.PT_G_ICOLLECTION, typeof(ICollection<>), "System.Collections.Generic.ICollection`1"),
Microsoft.Data.Analysis (58)
DataFrame.Join.cs (9)
185Dictionary<long, ICollection<long>> occurrences = GetOccurences(retainedDataFrame, supplementaryDataFrame, 192private static Dictionary<long, ICollection<long>> GetOccurences(DataFrame retainedDataFrame, DataFrame supplementaryDataFrame, 199Dictionary<long, ICollection<long>> occurrences = null; 252private static Dictionary<long, ICollection<long>> GetShrinkedOccurences(Dictionary<long, ICollection<long>> occurrences, 253Dictionary<long, ICollection<long>> newOccurrences) 255var shrinkedOccurences = new Dictionary<long, ICollection<long>>(); 276Dictionary<long, ICollection<long>> occurrences, HashSet<long> supplementaryJoinColumnsNullIndices, 292if (occurrences.TryGetValue(i, out ICollection<long> rowIndices))
DataFrameColumn.cs (6)
255public virtual Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) => throw new NotImplementedException(); 263public abstract Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices); 272protected Dictionary<long, ICollection<long>> GetGroupedOccurrences<TKey>(DataFrameColumn other, out HashSet<long> otherColumnNullIndices) 278Dictionary<TKey, ICollection<long>> multimap = other.GroupColumnValues<TKey>(out otherColumnNullIndices); 280var ret = new Dictionary<long, ICollection<long>>(); 286if (value != null && multimap.TryGetValue((TKey)value, out ICollection<long> otherRowIndices))
DataFrameColumns\ArrowStringDataFrameColumn.cs (8)
477Dictionary<string, ICollection<long>> groupedValues = GroupColumnValues<string>(out HashSet<long> _); 484Dictionary<string, ICollection<long>> dictionary = GroupColumnValues<string>(out HashSet<long> _); 489public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 494Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default); 500bool containsKey = multimap.TryGetValue(str, out ICollection<long> values); 515return multimap as Dictionary<TKey, ICollection<long>>; 697public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\StringDataFrameColumn.cs (10)
384internal static DataFrame ValueCountsImplementation(Dictionary<string, ICollection<long>> groupedValues) 388foreach (KeyValuePair<string, ICollection<long>> keyValuePair in groupedValues) 398Dictionary<string, ICollection<long>> groupedValues = GroupColumnValues<string>(out HashSet<long> _); 404Dictionary<string, ICollection<long>> dictionary = GroupColumnValues<string>(out HashSet<long> _); 408public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 412Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default); 419bool containsKey = multimap.TryGetValue(str, out ICollection<long> values); 434return multimap as Dictionary<TKey, ICollection<long>>; 534public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\VBufferDataFrameColumn.cs (1)
180public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
GroupBy.cs (15)
105private readonly IDictionary<TKey, ICollection<long>> _keyToRowIndicesMap; 108public GroupBy(DataFrame dataFrame, int groupByColumnIndex, IDictionary<TKey, ICollection<long>> keyToRowIndices) 117private delegate void ColumnDelegate(int columnIndex, long rowIndex, ICollection<long> rows, TKey key, bool firstGroup); 123foreach (KeyValuePair<TKey, ICollection<long>> pairs in _keyToRowIndicesMap) 126ICollection<long> rows = pairs.Value; 153ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 198ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 238ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 292ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 299ICollection<long> values = _keyToRowIndicesMap[key]; 367ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 395ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 423ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 451ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) => 480ColumnDelegate columnDelegate = new ColumnDelegate((int columnIndex, long rowIndex, ICollection<long> rowEnumerable, TKey key, bool firstGroup) =>
PrimitiveDataFrameColumn.cs (9)
383Dictionary<T, ICollection<long>> groupedValues = GroupColumnValues<T>(out HashSet<long> _); 386foreach (KeyValuePair<T, ICollection<long>> keyValuePair in groupedValues) 609Dictionary<T, ICollection<long>> dictionary = GroupColumnValues<T>(out HashSet<long> _); 613public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 617Dictionary<T, ICollection<long>> multimap = new Dictionary<T, ICollection<long>>(EqualityComparer<T>.Default); 630bool containsKey = multimap.TryGetValue(readOnlySpan[i], out ICollection<long> values); 646return multimap as Dictionary<TKey, ICollection<long>>; 923public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
Microsoft.DotNet.Build.Tasks.Packaging (3)
Extensions.cs (1)
162public static void AddRangeToMember<T, TItem>(this T target, Expression<Func<T, ICollection<TItem>>> memberLamda, IEnumerable<TItem> value)
HarvestPackage.cs (2)
540private static bool ProbePath(string path, ICollection<string> pathsIncluded) 555private static bool ProbePath<T>(string path, IDictionary<string, T> pathsIncluded, ICollection<string> pathsNotIncluded, out T result)
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
396private static bool TryAddNode(ICollection<string> existing, XElement parent, string id, bool isNative = false)
Microsoft.DotNet.SharedFramework.Sdk (1)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
396private static bool TryAddNode(ICollection<string> existing, XElement parent, string id, bool isNative = false)
Microsoft.DotNet.SignCheckLibrary (3)
Verification\Jar\JarSignatureFile.cs (1)
78public ICollection<Timestamp> Timestamps
Verification\SignatureVerificationResult.cs (2)
146public ICollection<SignatureVerificationResult> NestedResults 166public ICollection<Timestamp> Timestamps
Microsoft.Extensions.AI (17)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Abstractions (40)
AdditionalPropertiesDictionary{TValue}.cs (11)
71public ICollection<string> Keys => _dictionary.Keys; 74public ICollection<TValue> Values => _dictionary.Values; 80bool ICollection<KeyValuePair<string, TValue>>.IsReadOnly => false; 111void ICollection<KeyValuePair<string, TValue>>.Add(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Add(item); 117bool ICollection<KeyValuePair<string, TValue>>.Contains(KeyValuePair<string, TValue> item) => 118((ICollection<KeyValuePair<string, TValue>>)_dictionary).Contains(item); 124void ICollection<KeyValuePair<string, TValue>>.CopyTo(KeyValuePair<string, TValue>[] array, int arrayIndex) => 125((ICollection<KeyValuePair<string, TValue>>)_dictionary).CopyTo(array, arrayIndex); 143bool ICollection<KeyValuePair<string, TValue>>.Remove(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Remove(item);
ChatCompletion\ChatResponseExtensions.cs (1)
61if (updates is ICollection<ChatResponseUpdate> { Count: 0 })
Embeddings\GeneratedEmbeddings.cs (1)
59bool ICollection<TEmbedding>.IsReadOnly => false;
Functions\AIFunctionArguments.cs (10)
111public ICollection<string> Keys => _arguments.Keys; 114public ICollection<object?> Values => _arguments.Values; 120bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 132void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => 133((ICollection<KeyValuePair<string, object?>>)_arguments).Add(item); 139bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) => 140((ICollection<KeyValuePair<string, object?>>)_arguments).Contains(item); 147((ICollection<KeyValuePair<string, object?>>)_arguments).CopyTo(array, arrayIndex); 156bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) => 157((ICollection<KeyValuePair<string, object?>>)_arguments).Remove(item);
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Abstractions.Tests (1)
Embeddings\GeneratedEmbeddingsTests.cs (1)
39Assert.False(((ICollection<Embedding<float>>)instance).IsReadOnly);
Microsoft.Extensions.AI.AzureAIInference (17)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.Console (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.Reporting (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Evaluation.Safety (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Integration.Tests (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Ollama (17)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.OpenAI (17)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AI.Tests (1)
TestInMemoryCacheStorage.cs (1)
16public ICollection<string> Keys => _storage.Keys;
Microsoft.Extensions.AmbientMetadata.Application (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Caching.Abstractions (4)
Hybrid\HybridCache.cs (4)
175null or ICollection<string> { Count: 0 } => default, 176ICollection<string> { Count: 1 } => RemoveAsync(keys.First(), cancellationToken), 199null or ICollection<string> { Count: 0 } => default, 200ICollection<string> { Count: 1 } => RemoveByTagAsync(tags.Single(), cancellationToken),
Microsoft.Extensions.Caching.Hybrid (2)
Internal\TagSet.cs (1)
104if (tags is ICollection<string> collection)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Compliance.Redaction (2)
src\Shared\Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Compliance.Testing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Configuration (2)
ConfigurationManager.cs (2)
283public ICollection<string> Keys => _properties.Keys; 285public ICollection<object> Values => _properties.Values;
Microsoft.Extensions.Configuration.Binder (2)
ConfigurationBinder.cs (2)
458(interfaceGenericType == typeof(ICollection<>) || interfaceGenericType == typeof(IList<>))) 482Type? collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type);
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (1)
24public CallSiteFactory(ICollection<ServiceDescriptor> descriptors)
ServiceProvider.cs (1)
52internal ServiceProvider(ICollection<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions options)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ServiceCollection.cs (1)
73void ICollection<ServiceDescriptor>.Add(ServiceDescriptor item)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Diagnostics (1)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (1)
38if (tags2 is ICollection<KeyValuePair<string, object?>> tagsCol)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Diagnostics.HealthChecks (2)
DefaultHealthCheckService.cs (1)
42var registrations = _options.Value.Registrations;
HealthCheckServiceOptions.cs (1)
16public ICollection<HealthCheckRegistration> Registrations { get; } = new List<HealthCheckRegistration>();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
ApplicationLifecycleHealthChecksExtensionsTests.cs (1)
56var registrations = serviceProvider.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations;
ManualHealthCheckExtensionsTests.cs (1)
51var registrations = serviceProvider.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations;
Microsoft.Extensions.Diagnostics.Probes (2)
src\Shared\Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Diagnostics.Testing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Hosting.Testing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Http.Diagnostics (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Extensions.Http.Resilience (2)
src\Shared\Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Options.Contextual (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Options.SourceGeneration (2)
Emitter.cs (1)
79/// <see cref="System.ComponentModel.DataAnnotations.Validator.TryValidateValue(object, ValidationContext, ICollection{ValidationResult}, IEnumerable{ValidationAttribute})"/> is nullable annotated.
TypeDeclarationSyntaxReceiver.cs (1)
20public ICollection<TypeDeclarationSyntax> TypeDeclarations { get; } = new List<TypeDeclarationSyntax>();
Microsoft.Extensions.Primitives (6)
StringValues.cs (6)
114bool ICollection<string?>.IsReadOnly => true; 339bool ICollection<string?>.Contains(string? item) 352void ICollection<string?>.CopyTo(string?[] array, int arrayIndex) 388void ICollection<string?>.Add(string? item) => throw new NotSupportedException(); 392bool ICollection<string?>.Remove(string? item) => throw new NotSupportedException(); 396void ICollection<string?>.Clear() => throw new NotSupportedException();
Microsoft.Extensions.Resilience (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Resilience.Tests (2)
Resilience\ResilienceServiceCollectionExtensionsTests.cs (2)
38var enrichers = _services.BuildServiceProvider().GetRequiredService<IOptions<TelemetryOptions>>().Value.MeteringEnrichers; 48var enrichers = services.BuildServiceProvider().GetRequiredService<IOptions<TelemetryOptions>>().Value.MeteringEnrichers;
Microsoft.Extensions.Telemetry (2)
src\Shared\Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
267case ICollection<T> collection:
Microsoft.Extensions.Validation (1)
TypeExtensions.cs (1)
22type.GetGenericTypeDefinition() == typeof(ICollection<>) ||
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
25public ICollection<TypeDeclarationSyntax> TypeDeclarations { get; } = new List<TypeDeclarationSyntax>();
Microsoft.Gen.ComplianceReports.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Gen.ContextualOptions.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Gen.Logging (2)
src\Generators\Shared\ClassDeclarationSyntaxReceiver.cs (1)
25public ICollection<ClassDeclarationSyntax> ClassDeclarations { get; } = new List<ClassDeclarationSyntax>();
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
25public ICollection<TypeDeclarationSyntax> TypeDeclarations { get; } = new List<TypeDeclarationSyntax>();
Microsoft.Gen.Logging.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Gen.MetadataExtractor (2)
src\Generators\Shared\ClassDeclarationSyntaxReceiver.cs (1)
25public ICollection<ClassDeclarationSyntax> ClassDeclarations { get; } = new List<ClassDeclarationSyntax>();
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
25public ICollection<TypeDeclarationSyntax> TypeDeclarations { get; } = new List<TypeDeclarationSyntax>();
Microsoft.Gen.MetadataExtractor.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Gen.Metrics (2)
src\Generators\Shared\ClassDeclarationSyntaxReceiver.cs (1)
25public ICollection<ClassDeclarationSyntax> ClassDeclarations { get; } = new List<ClassDeclarationSyntax>();
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
25public ICollection<TypeDeclarationSyntax> TypeDeclarations { get; } = new List<TypeDeclarationSyntax>();
Microsoft.Gen.Metrics.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\ClassDeclarationSyntaxReceiver.cs (1)
25public ICollection<ClassDeclarationSyntax> ClassDeclarations { get; } = new List<ClassDeclarationSyntax>();
Microsoft.Gen.MetricsReports.Unit.Tests (16)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Microsoft.Interop.SourceGeneration (8)
Marshalling\MarshallerHelpers.cs (1)
120ICollection<T> elements,
ValueEqualityImmutableDictionary.cs (7)
47public ICollection<T> Keys => ((IDictionary<T, U>)Map).Keys; 48public ICollection<U> Values => ((IDictionary<T, U>)Map).Values; 50public bool IsReadOnly => ((ICollection<KeyValuePair<T, U>>)Map).IsReadOnly; 53public void CopyTo(KeyValuePair<T, U>[] array, int arrayIndex) => ((ICollection<KeyValuePair<T, U>>)Map).CopyTo(array, arrayIndex); 56public bool Remove(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Remove(item); 60public void Add(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Add(item); 61public void Clear() => ((ICollection<KeyValuePair<T, U>>)Map).Clear();
Microsoft.Maui.Controls (46)
Element\Element.cs (7)
1086 int ICollection<Element>.Count => _inner.Count; 1088 bool ICollection<Element>.IsReadOnly => true; 1090 void ICollection<Element>.Add(Element item) => throw new NotSupportedException(); 1092 void ICollection<Element>.Clear() => throw new NotSupportedException(); 1094 bool ICollection<Element>.Contains(Element item) => _inner.IndexOf(item) != -1; 1096 void ICollection<Element>.CopyTo(Element[] array, int arrayIndex) => throw new NotSupportedException(); 1106 bool ICollection<Element>.Remove(Element item) => throw new NotSupportedException();
Layout\Layout.cs (1)
55 public bool IsReadOnly => ((ICollection<IView>)_children).IsReadOnly;
LegacyLayouts\LayoutOfT.cs (8)
11 int ICollection<IView>.Count => _children.Count; 12 bool ICollection<IView>.IsReadOnly => ((ICollection<IView>)_children).IsReadOnly; 17 void ICollection<IView>.Add(IView child) 25 bool ICollection<IView>.Remove(IView child) 54 void ICollection<IView>.Clear() 59 bool ICollection<IView>.Contains(IView child) 64 void ICollection<IView>.CopyTo(IView[] array, int arrayIndex)
NavigationStepRequest.cs (1)
99 bool ICollection<NavigationStepRequest>.Remove(NavigationStepRequest item)
OrderedDictionary.cs (10)
44 readonly ICollection<KeyValuePair<TKey, TValue>> _kvpCollection; 70 public OrderedDictionary(ICollection<KeyValuePair<TKey, TValue>> dictionary) : this(dictionary, EqualityComparer<TKey>.Default) 74 public OrderedDictionary(ICollection<KeyValuePair<TKey, TValue>> dictionary, IEqualityComparer<TKey> equalityComparer) : this(dictionary != null ? dictionary.Count : 0, equalityComparer) 105 void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 119 bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 124 void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 148 bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 153 bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 203 public ICollection<TKey> Keys 234 public ICollection<TValue> Values
ResourceDictionary.cs (13)
81 public ICollection<ResourceDictionary> MergedDictionaries 154 void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 156 ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Add(item); 166 bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 168 return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Contains(item) 172 void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 174 ((ICollection<KeyValuePair<string, object>>)_innerDictionary).CopyTo(array, arrayIndex); 183 bool ICollection<KeyValuePair<string, object>>.IsReadOnly 185 get { return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).IsReadOnly; } 188 bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 190 return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Remove(item); 242 public ICollection<string> Keys 261 public ICollection<object> Values
Shell\ShellNavigationQueryParameters.cs (4)
51 public ICollection<string> Keys => _internal.Keys; 53 public ICollection<object> Values => _internal.Values; 82 => (_internal as ICollection<KeyValuePair<string, object>>)?.CopyTo(array, arrayIndex); 95 return (_internal as ICollection<KeyValuePair<string, object>>).Remove(item);
SynchronizedList.cs (1)
49 bool ICollection<T>.IsReadOnly
TableView\TableSection.cs (1)
70 bool ICollection<T>.IsReadOnly
Microsoft.Maui.Controls.Build.Tasks (4)
SetPropertiesVisitor.cs (2)
1723 var names = context.Cache.GetResourceNamesInUse(parent); 1774 var names = context.Cache.GetResourceNamesInUse(parent);
XamlCache.cs (2)
20 readonly Dictionary<VariableDefinition, ICollection<string>> _resourceNamesInUse = new(); 53 public ICollection<string> GetResourceNamesInUse(VariableDefinition variableDefinition) =>
Microsoft.ML.AutoML (15)
API\BinaryClassificationExperiment.cs (1)
37public ICollection<BinaryClassificationTrainer> Trainers { get; }
API\ColumnInference.cs (5)
97public ICollection<string> CategoricalColumnNames { get; private set; } 104public ICollection<string> NumericColumnNames { get; private set; } 111public ICollection<string> TextColumnNames { get; private set; } 118public ICollection<string> IgnoredColumnNames { get; private set; } 125public ICollection<string> ImagePathColumnNames { get; private set; }
API\MulticlassClassificationExperiment.cs (1)
37public ICollection<MulticlassClassificationTrainer> Trainers { get; }
API\RankingExperiment.cs (1)
28public ICollection<RankingTrainer> Trainers { get; }
API\RecommendationExperiment.cs (1)
27public ICollection<RecommendationTrainer> Trainers { get; }
API\RegressionExperiment.cs (1)
37public ICollection<RegressionTrainer> Trainers { get; }
Experiment\SuggestedPipelineBuilder.cs (3)
13ICollection<SuggestedTransform> transforms, 14ICollection<SuggestedTransform> transformsPostTrainer, 26ICollection<SuggestedTransform> transforms)
PipelineSuggesters\PipelineSuggester.cs (2)
123ICollection<SuggestedTransform> transforms, 124ICollection<SuggestedTransform> transformsPostTrainer,
Microsoft.ML.Core (15)
Utilities\Contracts.cs (13)
79private static int Size<T>(ICollection<T> c) 674public static ICollection<T> CheckNonEmpty<T>(ICollection<T> args, string paramName) 680public static ICollection<T> CheckNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string paramName) 686public static ICollection<T> CheckNonEmpty<T>(ICollection<T> args, string paramName, string msg) 692public static ICollection<T> CheckNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string paramName, string msg) 967public static void AssertNonEmpty<T>(ICollection<T> args) 973public static void AssertNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args) 980public static void AssertNonEmpty<T>(ICollection<T> args, string msg) 986public static void AssertNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string msg)
Utilities\Tree.cs (2)
70public ICollection<TKey> Keys { get { return _children.Keys; } } 74public ICollection<Tree<TKey, TValue>> Values { get { return _children.Values; } }
Microsoft.ML.CpuMath (13)
src\Microsoft.ML.Core\Utilities\Contracts.cs (13)
79private static int Size<T>(ICollection<T> c) 674public static ICollection<T> CheckNonEmpty<T>(ICollection<T> args, string paramName) 680public static ICollection<T> CheckNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string paramName) 686public static ICollection<T> CheckNonEmpty<T>(ICollection<T> args, string paramName, string msg) 692public static ICollection<T> CheckNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string paramName, string msg) 967public static void AssertNonEmpty<T>(ICollection<T> args) 973public static void AssertNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args) 980public static void AssertNonEmpty<T>(ICollection<T> args, string msg) 986public static void AssertNonEmpty<T>(this IExceptionContext ctx, ICollection<T> args, string msg)
Microsoft.ML.Data (1)
DataView\DataViewConstructionUtils.cs (1)
701=> (_data as ICollection<TRow>)?.Count;
Microsoft.ML.Fairlearn (1)
Reductions\GridSearchTrialRunner.cs (1)
58var key = lambdas.Keys;
Microsoft.ML.SearchSpace (20)
Option\NestOption.cs (9)
80public ICollection<string> Keys => ((IDictionary<string, OptionBase>)_options).Keys; 83public ICollection<OptionBase> Values => ((IDictionary<string, OptionBase>)_options).Values; 86public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count; 89public bool IsReadOnly => ((ICollection<KeyValuePair<string, OptionBase>>)_options).IsReadOnly; 100((ICollection<KeyValuePair<string, OptionBase>>)_options).Add(item); 106((ICollection<KeyValuePair<string, OptionBase>>)_options).Clear(); 112return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Contains(item); 124((ICollection<KeyValuePair<string, OptionBase>>)_options).CopyTo(array, arrayIndex); 142return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Remove(item);
Parameter.cs (2)
250ICollection<Parameter> IDictionary<string, Parameter>.Values 260public ICollection<string> Keys
SearchSpace.cs (9)
83public ICollection<string> Keys => ((IDictionary<string, OptionBase>)_options).Keys; 86public ICollection<OptionBase> Values => ((IDictionary<string, OptionBase>)_options).Values; 89public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count; 92public bool IsReadOnly => ((ICollection<KeyValuePair<string, OptionBase>>)_options).IsReadOnly; 337((ICollection<KeyValuePair<string, OptionBase>>)_options).Add(item); 343((ICollection<KeyValuePair<string, OptionBase>>)_options).Clear(); 349return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Contains(item); 355((ICollection<KeyValuePair<string, OptionBase>>)_options).CopyTo(array, arrayIndex); 361return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Remove(item);
Microsoft.ML.Tokenizers (7)
Model\BertTokenizer.cs (6)
299if (tokenIds is ICollection<int> c1) 305capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1; 410if (tokenIds is ICollection<int> c1) 416capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1; 566if (tokenIds is ICollection<int> c1) 572capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1;
Tokenizer.cs (1)
372if (ids is ICollection<int> c)
Microsoft.ML.TorchSharp (3)
Utils\DefaultDictionary.cs (3)
72((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 104public ICollection<TKey> Keys => _dictionary.Keys; 106public ICollection<TValue> Values => _dictionary.Values;
Microsoft.Net.Http.Headers (13)
CacheControlHeaderValue.cs (5)
88private ICollection<StringSegment>? _noCacheHeaders; 99private ICollection<StringSegment>? _privateHeaders; 129public ICollection<StringSegment> NoCacheHeaders 275public ICollection<StringSegment> PrivateHeaders 712ref ICollection<StringSegment>? destination)
HeaderUtilities.cs (4)
84internal static bool AreEqualCollections<T>(ICollection<T>? x, ICollection<T>? y) 89internal static bool AreEqualCollections<T>(ICollection<T>? x, ICollection<T>? y, IEqualityComparer<T>? comparer)
ObjectCollection.cs (1)
56public bool IsReadOnly => ((ICollection<T>)this).IsReadOnly;
RangeHeaderValue.cs (2)
24private ICollection<RangeItemHeaderValue>? _ranges; 63public ICollection<RangeItemHeaderValue> Ranges
RangeItemHeaderValue.cs (1)
106ICollection<RangeItemHeaderValue> rangeCollection)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
90[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ICollection<>))]
netstandard (1)
netstandard.cs (1)
112[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ICollection<>))]
PresentationCore (131)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (2)
621public ICollection<int> Keys 672public ICollection<ushort> Values
MS\Internal\FontCache\FontSourceCollection.cs (1)
88ICollection<string> files;
MS\Internal\FontFace\CompositeFontInfo.cs (1)
349internal ICollection<XmlLanguage> FamilyMapLanguages
MS\Internal\FontFace\FontDriver.cs (1)
239internal byte[] ComputeFontSubset(ICollection<ushort> glyphs)
MS\Internal\FontFace\IFontFamily.cs (1)
104ICollection<Typeface> GetTypefaces(FontFamilyIdentifier familyIdentifier);
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
435ICollection<Typeface> IFontFamily.GetTypefaces(FontFamilyIdentifier familyIdentifier)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
192ICollection<ApplicationGesture> collection = applicationGestures as ICollection<ApplicationGesture>;
MS\Internal\Shaping\CompositeFontFamily.cs (1)
257ICollection<Typeface> IFontFamily.GetTypefaces(FontFamilyIdentifier familyIdentifier)
MS\Internal\Shaping\TypefaceMap.cs (1)
129SpanVector itemSpans = new SpanVector(null, new FrugalStructList<Span>((ICollection<Span>)spans));
MS\Internal\TextFormatting\LineServicesCallbacks.cs (2)
3479private ICollection<IndexedGlyphRun> _indexedGlyphRuns; 3490internal ICollection<IndexedGlyphRun> IndexedGlyphRuns
System\Windows\FreezableCollection.cs (4)
372bool ICollection<T>.IsReadOnly 409return ((ICollection<T>)this).IsReadOnly; 657ICollection<T> enumerableAsICollectionT = enumerable as ICollection<T>;
System\Windows\Generated\TextDecorationCollection.cs (4)
284bool ICollection<TextDecoration>.IsReadOnly 321return ((ICollection<TextDecoration>)this).IsReadOnly; 901ICollection<TextDecoration> icollectionOfT = collection as ICollection<TextDecoration>;
System\Windows\Ink\Stroke.cs (2)
1147ICollection<Point> icol = ienum as ICollection<Point>;
System\Windows\Ink\StrokeCollection.cs (1)
872bool ICollection<Stroke>.IsReadOnly
System\Windows\Input\ManipulationLogic.cs (2)
354internal void ReportFrame(ICollection<IManipulator> manipulators) 508private void UpdateManipulators(ICollection<IManipulator> updatedManipulators)
System\Windows\Media\Animation\Generated\TimelineCollection.cs (4)
283bool ICollection<Timeline>.IsReadOnly 320return ((ICollection<Timeline>)this).IsReadOnly; 900ICollection<Timeline> icollectionOfT = collection as ICollection<Timeline>;
System\Windows\Media\CharacterMetricsDictionary.cs (2)
251public ICollection<int> Keys 260public ICollection<CharacterMetrics> Values
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
220public ICollection<XmlLanguage> Keys 229public ICollection<string> Values
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (4)
286bool ICollection<BitmapEffect>.IsReadOnly 323return ((ICollection<BitmapEffect>)this).IsReadOnly; 903ICollection<BitmapEffect> icollectionOfT = collection as ICollection<BitmapEffect>;
System\Windows\Media\FamilyTypefaceCollection.cs (2)
14private ICollection<Typeface> _innerList; 31internal FamilyTypefaceCollection(ICollection<Typeface> innerList)
System\Windows\Media\FontEmbeddingManager.cs (2)
65public ICollection<Uri> GlyphTypefaceUris 82public ICollection<ushort> GetUsedGlyphs(Uri glyphTypeface)
System\Windows\Media\FontFamily.cs (1)
243public ICollection<Typeface> GetTypefaces()
System\Windows\Media\Fonts.cs (11)
40public static ICollection<FontFamily> GetFontFamilies(string location) 57public static ICollection<FontFamily> GetFontFamilies(Uri baseUri) 80public static ICollection<FontFamily> GetFontFamilies(Uri baseUri, string location) 133public static ICollection<Typeface> GetTypefaces(string location) 150public static ICollection<Typeface> GetTypefaces(Uri baseUri) 172public static ICollection<Typeface> GetTypefaces(Uri baseUri, string location) 191public static ICollection<FontFamily> SystemFontFamilies 203public static ICollection<Typeface> SystemTypefaces 231private static ICollection<FontFamily> CreateFamilyCollection( 259private static ICollection<FontFamily> CreateDefaultFamilyCollection() 393private static readonly ICollection<FontFamily> _defaultFontCollection = CreateDefaultFamilyCollection();
System\Windows\Media\Generated\DoubleCollection.cs (4)
245bool ICollection<double>.IsReadOnly 282return ((ICollection<double>)this).IsReadOnly; 928ICollection<double> icollectionOfT = collection as ICollection<double>;
System\Windows\Media\Generated\DrawingCollection.cs (4)
305bool ICollection<Drawing>.IsReadOnly 342return ((ICollection<Drawing>)this).IsReadOnly; 945ICollection<Drawing> icollectionOfT = collection as ICollection<Drawing>;
System\Windows\Media\Generated\GeneralTransformCollection.cs (4)
293bool ICollection<GeneralTransform>.IsReadOnly 330return ((ICollection<GeneralTransform>)this).IsReadOnly; 910ICollection<GeneralTransform> icollectionOfT = collection as ICollection<GeneralTransform>;
System\Windows\Media\Generated\GeometryCollection.cs (4)
305bool ICollection<Geometry>.IsReadOnly 342return ((ICollection<Geometry>)this).IsReadOnly; 945ICollection<Geometry> icollectionOfT = collection as ICollection<Geometry>;
System\Windows\Media\Generated\GradientStopCollection.cs (4)
293bool ICollection<GradientStop>.IsReadOnly 330return ((ICollection<GradientStop>)this).IsReadOnly; 1013ICollection<GradientStop> icollectionOfT = collection as ICollection<GradientStop>;
System\Windows\Media\Generated\Int32Collection.cs (4)
245bool ICollection<int>.IsReadOnly 282return ((ICollection<int>)this).IsReadOnly; 928ICollection<int> icollectionOfT = collection as ICollection<int>;
System\Windows\Media\Generated\PathFigureCollection.cs (4)
294bool ICollection<PathFigure>.IsReadOnly 331return ((ICollection<PathFigure>)this).IsReadOnly; 1000ICollection<PathFigure> icollectionOfT = collection as ICollection<PathFigure>;
System\Windows\Media\Generated\PathSegmentCollection.cs (4)
293bool ICollection<PathSegment>.IsReadOnly 330return ((ICollection<PathSegment>)this).IsReadOnly; 910ICollection<PathSegment> icollectionOfT = collection as ICollection<PathSegment>;
System\Windows\Media\Generated\PointCollection.cs (4)
245bool ICollection<Point>.IsReadOnly 282return ((ICollection<Point>)this).IsReadOnly; 930ICollection<Point> icollectionOfT = collection as ICollection<Point>;
System\Windows\Media\Generated\TextEffectCollection.cs (4)
293bool ICollection<TextEffect>.IsReadOnly 330return ((ICollection<TextEffect>)this).IsReadOnly; 910ICollection<TextEffect> icollectionOfT = collection as ICollection<TextEffect>;
System\Windows\Media\Generated\TransformCollection.cs (4)
305bool ICollection<Transform>.IsReadOnly 342return ((ICollection<Transform>)this).IsReadOnly; 945ICollection<Transform> icollectionOfT = collection as ICollection<Transform>;
System\Windows\Media\Generated\VectorCollection.cs (4)
245bool ICollection<Vector>.IsReadOnly 282return ((ICollection<Vector>)this).IsReadOnly; 930ICollection<Vector> icollectionOfT = collection as ICollection<Vector>;
System\Windows\Media\GlyphTypeface.cs (3)
221public byte[] ComputeSubset(ICollection<ushort> glyphs) 1745public ICollection<ushort> Keys 1769public ICollection<double> Values
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
230internal ICollection<IndexedGlyphRun> IndexedGlyphRuns
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (4)
291bool ICollection<GeneralTransform3D>.IsReadOnly 328return ((ICollection<GeneralTransform3D>)this).IsReadOnly; 908ICollection<GeneralTransform3D> icollectionOfT = collection as ICollection<GeneralTransform3D>;
System\Windows\Media3D\Generated\MaterialCollection.cs (4)
303bool ICollection<Material>.IsReadOnly 340return ((ICollection<Material>)this).IsReadOnly; 943ICollection<Material> icollectionOfT = collection as ICollection<Material>;
System\Windows\Media3D\Generated\Model3DCollection.cs (4)
303bool ICollection<Model3D>.IsReadOnly 340return ((ICollection<Model3D>)this).IsReadOnly; 943ICollection<Model3D> icollectionOfT = collection as ICollection<Model3D>;
System\Windows\Media3D\Generated\Point3DCollection.cs (4)
243bool ICollection<Point3D>.IsReadOnly 280return ((ICollection<Point3D>)this).IsReadOnly; 929ICollection<Point3D> icollectionOfT = collection as ICollection<Point3D>;
System\Windows\Media3D\Generated\Transform3DCollection.cs (4)
303bool ICollection<Transform3D>.IsReadOnly 340return ((ICollection<Transform3D>)this).IsReadOnly; 943ICollection<Transform3D> icollectionOfT = collection as ICollection<Transform3D>;
System\Windows\Media3D\Generated\Vector3DCollection.cs (4)
243bool ICollection<Vector3D>.IsReadOnly 280return ((ICollection<Vector3D>)this).IsReadOnly; 929ICollection<Vector3D> icollectionOfT = collection as ICollection<Vector3D>;
System\Windows\Media3D\Visual3DCollection.cs (1)
290bool ICollection<Visual3D>.IsReadOnly
PresentationFramework (44)
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
471ICollection<AnnotationResource> cargos = annot.Cargos;
MS\Internal\Annotations\ObservableDictionary.cs (10)
151void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair) 153((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair); 162bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair) 164return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair); 173bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair) 175return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair); 185void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex) 191((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex); 277public ICollection<string> Keys 289public ICollection<string> Values
MS\Internal\Annotations\TextAnchor.cs (5)
187internal bool IsOverlapping(ICollection<TextSegment> textSegments) 277internal static TextAnchor TrimToRelativeComplement(TextAnchor anchor, ICollection<TextSegment> textSegments) 379internal static TextAnchor TrimToIntersectionWith(TextAnchor anchor, ICollection<TextSegment> textSegments) 589private static ICollection<TextSegment> SortTextSegments(ICollection<TextSegment> textSegments, bool excludeZeroLength)
MS\Internal\Data\LiveShapingList.cs (1)
714ICollection<DependencyProperty> usedDPs = this.Values;
MS\Internal\Documents\ContentElementCollection.cs (1)
545/// <see cref="ICollection&lt;T&gt;.IsReadOnly"/>
MS\Internal\ListOfObject.cs (7)
54void ICollection<object>.Add(object item) 59void ICollection<object>.Clear() 64bool ICollection<object>.Contains(object item) 69void ICollection<object>.CopyTo(object[] array, int arrayIndex) 74int ICollection<object>.Count 79bool ICollection<object>.IsReadOnly 84bool ICollection<object>.Remove(object item)
MS\Internal\WeakDictionary.cs (2)
200public ICollection<TKey> Keys 233public ICollection<TValue> Values
System\Windows\Annotations\LocatorPart.cs (1)
394foreach (KeyValuePair<string, string> k_v in ((ICollection<KeyValuePair<string, string>>)this.NameValuePairs))
System\Windows\Controls\CustomDictionarySources.cs (8)
141void ICollection<Uri>.Add(Uri item) 152void ICollection<Uri>.Clear() 158bool ICollection<Uri>.Contains(Uri item) 163void ICollection<Uri>.CopyTo(Uri[] array, int arrayIndex) 168int ICollection<Uri>.Count 176bool ICollection<Uri>.IsReadOnly 180return ((ICollection<Uri>)_uriList).IsReadOnly; 184bool ICollection<Uri>.Remove(Uri item)
System\Windows\Controls\TextChangedEventArgs.cs (3)
68public TextChangedEventArgs(RoutedEvent id, UndoAction action, ICollection<TextChange> changes) : base() 133public ICollection<TextChange> Changes 160private readonly ICollection<TextChange> _changes;
System\Windows\Documents\FixedDocument.cs (2)
1153ICollection<FixedPage> newHighlightPages = _highlights.Keys as ICollection<FixedPage>;
System\Windows\Documents\TableColumnCollection.cs (1)
366/// <see cref="ICollection&lt;T&gt;.IsReadOnly"/>
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
41public override ICollection<XamlType> GetAllXamlTypes(string xamlNamespace)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
502if (typeof(ICollection<System.Windows.Data.XmlNamespaceMapping>).IsAssignableFrom(UnderlyingType)
PresentationUI (4)
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
405ICollection<XpsSignatureDefinition> documentSignatureDefinitionList =
MS\Internal\Documents\RightsManagementProvider.cs (3)
661ICollection<ContentGrant> licenseGrants = 1325private ICollection<ContentGrant> GetGrantsFromUnsignedLicense( 1328ICollection<ContentGrant> grants = null;
ReachFramework (13)
packaging\XpsDigitalSignature.cs (2)
308ICollection<Uri> containingCollection, 309ICollection<Uri> containedCollection
Packaging\XpsFixedDocumentReaderWriter.cs (2)
92ICollection<XpsSignatureDefinition> 351ICollection<XpsSignatureDefinition>
Packaging\XpsFixedPageReaderWriter.cs (8)
155ICollection<XpsFont> 161ICollection<XpsColorContext> 167ICollection<XpsResourceDictionary> 173ICollection<XpsImage> 631public ICollection<XpsFont> 644public ICollection<XpsColorContext> 658public ICollection<XpsResourceDictionary> 672public ICollection<XpsImage>
Serialization\XpsFontSubsetter.cs (1)
586ICollection<ushort> glyphs,
Roslyn.Diagnostics.Analyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Shared (18)
Data.Validation\LengthAttribute.cs (1)
19/// on .NET Framework, while <see cref="System.Collections.Generic.ICollection{T}"/> type is supported only on .NET Core.
EmptyCollections\EmptyCollectionExtensions.cs (2)
47public static IEnumerable<T> EmptyIfNull<T>(this ICollection<T>? collection) 112if (enumerable is ICollection<T> c && c.Count == 0)
EmptyCollections\EmptyReadonlyDictionary.cs (8)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
EmptyCollections\EmptyReadOnlyList.cs (6)
27void ICollection<T>.CopyTo(T[] array, int arrayIndex) 32bool ICollection<T>.Contains(T item) => false; 33bool ICollection<T>.IsReadOnly => true; 34void ICollection<T>.Add(T item) => throw new NotSupportedException(); 35bool ICollection<T>.Remove(T item) => false; 37void ICollection<T>.Clear()
Throw\Throw.cs (1)
267case ICollection<T> collection:
Shared.Tests (10)
EmptyCollections\EmptyCollectionExtensionsTests.cs (3)
20EmptyCollectionExtensions.EmptyIfNull((ICollection<T>?)null).Should().BeEmpty(); 29EmptyCollectionExtensions.EmptyIfNull((ICollection<T>)input).Should().BeEmpty().And.NotBeSameAs(input); 39EmptyCollectionExtensions.EmptyIfNull((ICollection<T>)nonempty).Should().BeSameAs(nonempty);
EmptyCollections\EmptyReadonlyDictionaryTests.cs (2)
58var coll = EmptyReadOnlyDictionary<int, string>.Instance as ICollection<KeyValuePair<int, string>>;
EmptyCollections\EmptyReadOnlyListTests.cs (2)
55var coll = EmptyReadOnlyList<int>.Instance as ICollection<int>;
Throw\ThrowTest.cs (3)
322ArgumentException exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((ICollection<int>?)null, "foo")); 339exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((ICollection<int>?)list, "foo")); 364Assert.Equal(list, Throw.IfNullOrEmpty((ICollection<int>?)list, "foo"));
Sockets.BindTests (3)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (3)
632var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses; 677var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses; 717var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses;
StartRequestDelegateUrlApp (1)
Program.cs (1)
30var addresses = host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
StartRouteBuilderUrlApp (1)
Program.cs (1)
31var addresses = host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
StartWithIApplicationBuilderUrlApp (1)
Program.cs (1)
34var addresses = host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
System.Collections (57)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
35if (source is ICollection<T> ic)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (2)
10private readonly ICollection<T> _collection; 12public ICollectionDebugView(ICollection<T> collection)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (4)
36private readonly ICollection<TKey> _collection; 38public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 57private readonly ICollection<TValue> _collection; 59public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
44internal static void CopyTo<T>(ICollection<T> collection, Array array, int index)
System\Collections\Generic\LinkedList.cs (2)
64bool ICollection<T>.IsReadOnly 69void ICollection<T>.Add(T value)
System\Collections\Generic\OrderedDictionary.cs (19)
200this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 245bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 266ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 278ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 1196void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value); 1199bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 1209void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 1226bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => 1307((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index); 1375((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair); 1484bool ICollection<TKey>.IsReadOnly => true; 1606void ICollection<TKey>.Add(TKey item) => throw new NotSupportedException(); 1609void ICollection<TKey>.Clear() => throw new NotSupportedException(); 1615bool ICollection<TKey>.Remove(TKey item) => throw new NotSupportedException(); 1679bool ICollection<TValue>.IsReadOnly => true; 1737bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item); 1767void ICollection<TValue>.Add(TValue item) => throw new NotSupportedException(); 1770void ICollection<TValue>.Clear() => throw new NotSupportedException(); 1776bool ICollection<TValue>.Remove(TValue item) => throw new NotSupportedException();
System\Collections\Generic\PriorityQueue.cs (3)
407var collection = items as ICollection<(TElement Element, TPriority Priority)>; 470if (elements is ICollection<TElement> collection &&
System\Collections\Generic\SortedDictionary.cs (15)
59void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 64bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 82bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 98bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 155ICollection<TKey> IDictionary<TKey, TValue>.Keys 173ICollection<TValue> IDictionary<TKey, TValue>.Values 592bool ICollection<TKey>.IsReadOnly 597void ICollection<TKey>.Add(TKey item) 602void ICollection<TKey>.Clear() 612bool ICollection<TKey>.Remove(TKey item) 753bool ICollection<TValue>.IsReadOnly 758void ICollection<TValue>.Add(TValue item) 763void ICollection<TValue>.Clear() 768bool ICollection<TValue>.Contains(TValue item) 773bool ICollection<TValue>.Remove(TValue item)
System\Collections\Generic\SortedList.cs (7)
189void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 194bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 204bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 301ICollection<TKey> IDictionary<TKey, TValue>.Keys 337ICollection<TValue> IDictionary<TKey, TValue>.Values 365bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 431void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
System\Collections\Generic\SortedSet.cs (3)
277bool ICollection<T>.IsReadOnly => false; 301void ICollection<T>.Add(T item) => Add(item); 1326if (other is ICollection<T> c && c.Count == 0)
System.Collections.Concurrent (14)
System\Collections\Concurrent\ConcurrentDictionary.cs (14)
288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count), 736/// Copies the elements of the <see cref="ICollection{T}"/> to an array of type <see cref="KeyValuePair{TKey,TValue}"/>, 751void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1571public ICollection<TKey> Keys => GetKeys(); 1580public ICollection<TValue> Values => GetValues(); 1589/// Adds the specified value to the <see cref="ICollection{TValue}"/> 1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value); 1605/// Determines whether the <see cref="ICollection{T}"/> 1610/// cref="ICollection{TValue}"/>.</param> 1612/// cref="ICollection{T}"/>; otherwise, false.</returns> 1613bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) => 1620/// <value>true if the <see cref="ICollection{T}"/> is 1624bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 1637bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) =>
System.Collections.Immutable (175)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (4)
36private readonly ICollection<TKey> _collection; 38public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 57private readonly ICollection<TValue> _collection; 59public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
System\Collections\Frozen\FrozenDictionary.cs (7)
334ICollection<TKey> IDictionary<TKey, TValue>.Keys => 355ICollection<TValue> IDictionary<TKey, TValue>.Values => 460bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 601bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => 651void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 660bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 666void ICollection<KeyValuePair<TKey, TValue>>.Clear() => throw new NotSupportedException();
System\Collections\Frozen\FrozenSet.cs (4)
296bool ICollection<T>.IsReadOnly => true; 416void ICollection<T>.Add(T item) => throw new NotSupportedException(); 419void ICollection<T>.Clear() => throw new NotSupportedException(); 422bool ICollection<T>.Remove(T item) => throw new NotSupportedException();
System\Collections\Frozen\FrozenSetInternalBase.cs (3)
35if (other is ICollection<T> otherAsCollection) 62if (other is ICollection<T> otherAsCollection) 106if (other is ICollection<T> otherAsCollection)
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (1)
27((ICollection<KeyValuePair<int, TValue>>)source).CopyTo(entries, 0);
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (1)
23((ICollection<KeyValuePair<TKey, TValue>>)source).CopyTo(entries, 0);
System\Collections\Immutable\ImmutableArray_1.Builder.cs (10)
179/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 181/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 183bool ICollection<T>.IsReadOnly 241/// Removes all items from the <see cref="ICollection{T}"/>. 323/// Adds an item to the <see cref="ICollection{T}"/>. 325/// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param> 669/// Determines whether the <see cref="ICollection{T}"/> contains a specific value. 671/// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param> 673/// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false. 1072private void RemoveAtRange(ICollection<int> indicesToRemove)
System\Collections\Immutable\ImmutableArray_1.cs (7)
42bool ICollection<T>.IsReadOnly 52int ICollection<T>.Count 1053void ICollection<T>.Add(T item) 1058void ICollection<T>.Clear() 1063bool ICollection<T>.Remove(T item) 1202/// Removes all items from the <see cref="ICollection{T}"/>. 1477private ImmutableArray<T> RemoveAtRange(ICollection<int> indicesToRemove)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (32)
137/// Gets the number of elements contained in the <see cref="ICollection{T}"/>. 139/// <returns>The number of elements contained in the <see cref="ICollection{T}"/>.</returns> 146/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 148/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.</returns> 149bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 169/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 171/// <returns>An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns> 172ICollection<TKey> IDictionary<TKey, TValue>.Keys 192/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 194/// <returns>An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns> 195ICollection<TValue> IDictionary<TKey, TValue>.Values 214/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 216/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 224/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 227/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>. 235/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 238/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>. 605/// Adds an item to the <see cref="ICollection{T}"/>. 607/// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param> 608/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception> 615/// Removes all items from the <see cref="ICollection{T}"/>. 617/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only. </exception> 625/// Determines whether the <see cref="ICollection{T}"/> contains a specific value. 627/// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param> 629/// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false. 637/// See the <see cref="ICollection{T}"/> interface. 639void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 654/// Removes the first occurrence of a specific object from the <see cref="ICollection{T}"/>. 656/// <param name="item">The object to remove from the <see cref="ICollection{T}"/>.</param> 658/// true if <paramref name="item"/> was successfully removed from the <see cref="ICollection{T}"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="ICollection{T}"/>. 660/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
System\Collections\Immutable\ImmutableDictionary_2.cs (13)
218ICollection<TKey> IDictionary<TKey, TValue>.Keys 226ICollection<TValue> IDictionary<TKey, TValue>.Values 271bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 601void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 606void ICollection<KeyValuePair<TKey, TValue>>.Clear() 611bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 616void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 642/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 644/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 652/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 655/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>. 663/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 666/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (4)
41if (sequence is ICollection<T> collectionOfT) 94/// implementation of <see cref="ICollection{T}"/> could hold on to the array when its <see cref="ICollection{T}.CopyTo"/> 143/// because that only tries to cast the sequence to <see cref="ICollection{T}"/> to determine
System\Collections\Immutable\ImmutableHashSet_1.Builder.cs (21)
80/// Gets the number of elements contained in the <see cref="ICollection{T}"/>. 82/// <returns>The number of elements contained in the <see cref="ICollection{T}"/>.</returns> 89/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 91/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.</returns> 92bool ICollection<T>.IsReadOnly 235/// Removes the first occurrence of a specific object from the <see cref="ICollection{T}"/>. 237/// <param name="item">The object to remove from the <see cref="ICollection{T}"/>.</param> 239/// true if <paramref name="item"/> was successfully removed from the <see cref="ICollection{T}"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="ICollection{T}"/>. 241/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception> 250/// Determines whether the <see cref="ICollection{T}"/> contains a specific value. 252/// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param> 254/// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false. 262/// Removes all items from the <see cref="ICollection{T}"/>. 264/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only. </exception> 381/// Adds an item to the <see cref="ICollection{T}"/>. 383/// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param> 384/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception> 385void ICollection<T>.Add(T item) 391/// See the <see cref="ICollection{T}"/> interface. 393void ICollection<T>.CopyTo(T[] array, int arrayIndex)
System\Collections\Immutable\ImmutableHashSet_1.cs (8)
482/// See the <see cref="ICollection{T}"/> interface. 484bool ICollection<T>.IsReadOnly 490/// See the <see cref="ICollection{T}"/> interface. 492void ICollection<T>.CopyTo(T[] array, int arrayIndex) 507void ICollection<T>.Add(T item) 513/// See the <see cref="ICollection{T}"/> interface. 515void ICollection<T>.Clear() 523bool ICollection<T>.Remove(T item)
System\Collections\Immutable\ImmutableList_1.Builder.cs (3)
79bool ICollection<T>.IsReadOnly 1098/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 1100/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
System\Collections\Immutable\ImmutableList_1.cs (8)
955void ICollection<T>.Add(T item) => throw new NotSupportedException(); 961void ICollection<T>.Clear() => throw new NotSupportedException(); 964/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 966/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 968bool ICollection<T>.IsReadOnly => true; 976bool ICollection<T>.Remove(T item) => throw new NotSupportedException(); 1047/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 1049/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (10)
86ICollection<TKey> IDictionary<TKey, TValue>.Keys 102ICollection<TValue> IDictionary<TKey, TValue>.Values 127bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 225/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 227/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 235/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 238/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>. 246/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 249/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>. 508void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (13)
144ICollection<TKey> IDictionary<TKey, TValue>.Keys 152ICollection<TValue> IDictionary<TKey, TValue>.Values 161bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 506void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 511void ICollection<KeyValuePair<TKey, TValue>>.Clear() 516bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 521void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 547/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 549/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 557/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 560/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>. 568/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 571/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (4)
85bool ICollection<T>.IsReadOnly 342void ICollection<T>.Add(T item) 366/// See <see cref="ICollection{T}"/> 368void ICollection<T>.CopyTo(T[] array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedSet_1.cs (10)
706/// See the <see cref="ICollection{T}"/> interface. 708bool ICollection<T>.IsReadOnly 714/// See the <see cref="ICollection{T}"/> interface. 716void ICollection<T>.CopyTo(T[] array, int arrayIndex) 724void ICollection<T>.Add(T item) 730/// See the <see cref="ICollection{T}"/> interface. 732void ICollection<T>.Clear() 740bool ICollection<T>.Remove(T item) 788/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 790/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (2)
304/// See the <see cref="ICollection{T}"/> interface. 318/// See the <see cref="ICollection{T}"/> interface.
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (10)
42/// See <see cref="ICollection{T}"/> 50/// See <see cref="ICollection{T}"/> 52/// <returns>The number of elements contained in the <see cref="ICollection{T}"/>.</returns> 67/// See <see cref="ICollection{T}"/> 75/// See <see cref="ICollection{T}"/> 83/// See <see cref="ICollection{T}"/> 88/// See <see cref="ICollection{T}"/> 103/// See <see cref="ICollection{T}"/> 178/// See <see cref="ICollection{T}"/> 200/// See <see cref="ICollection{T}"/>
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\Validator.cs (4)
50ICollection<ValidationResult>? validationResults) 96object instance, ValidationContext validationContext, ICollection<ValidationResult>? validationResults) => 134ICollection<ValidationResult>? validationResults, bool validateAllProperties) 186ICollection<ValidationResult>? validationResults, IEnumerable<ValidationAttribute> validationAttributes)
System.ComponentModel.Composition (15)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (5)
12public static ICollection<object> GetCollectionWrapper(Type itemType, object collectionObject) 21return (ICollection<object>)collectionObject; 34return (ICollection<object>)Activator.CreateInstance(collectionType, collectionObject)!; 94private readonly ICollection<T> _collectionOfT; 98_collectionOfT = (ICollection<T>)collectionOfT;
Microsoft\Internal\Collections\CollectionServices.cs (4)
18private static readonly Type ICollectionOfTType = typeof(ICollection<>); 81public static ICollection<T>? ConcatAllowingNull<T>(this ICollection<T>? source, ICollection<T>? second)
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (2)
159/// An <see cref="ICollection{T}"/> of underlying <see cref="ComposablePartCatalog"/> objects 165public ICollection<ComposablePartCatalog> Catalogs
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (4)
109ICollection<object>? collection = null; 120private ICollection<object> GetNormalizedCollection(Type itemType, object? instance) 181private void EnsureCollectionIsWritable(ICollection<object>? collection) 213private void PopulateCollection(ICollection<object?> collection, IEnumerable values)
System.Composition.Convention (1)
System\Composition\Convention\ImportConventionBuilder.cs (1)
15private static readonly Type[] s_supportedImportManyTypes = new[] { typeof(IList<>), typeof(ICollection<>), typeof(IEnumerable<>) };
System.Composition.Hosting (3)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (2)
43public ICollection<string> Keys 58public ICollection<object> Values
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (1)
15private static readonly Type[] s_supportedContractTypes = new[] { typeof(IList<>), typeof(ICollection<>), typeof(IEnumerable<>) };
System.Composition.TypedParts (6)
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (6)
16private readonly Dictionary<CompositionContract, ICollection<DiscoveredExport>> _discoveredParts = new Dictionary<CompositionContract, ICollection<DiscoveredExport>>(); 45ICollection<DiscoveredExport> forKey; 60ICollection<DiscoveredExport> forKey; 84ICollection<DiscoveredExport> forKey; 111ICollection<DiscoveredExport> openGenericParts;
System.Configuration.ConfigurationManager (11)
System\Configuration\ConfigurationErrorsException.cs (4)
86internal ConfigurationErrorsException(ICollection<ConfigurationException> coll) : 179internal ICollection<ConfigurationException> ErrorsGeneric => (ICollection<ConfigurationException>)Errors; 192private static ConfigurationException GetFirstException(ICollection<ConfigurationException> coll)
System\Configuration\ConfigurationSchemaErrors.cs (1)
88internal void AddSavedLocalErrors(ICollection<ConfigurationException> coll)
System\Configuration\ErrorsHelper.cs (2)
32ICollection<ConfigurationException> col = ce.ErrorsGeneric; 38internal static void AddErrors(ref List<ConfigurationException> errors, ICollection<ConfigurationException> coll)
System\Configuration\FactoryRecord.cs (2)
39ICollection<ConfigurationException> errors) 256internal void AddErrors(ICollection<ConfigurationException> coll)
System\Configuration\LocationSectionRecord.cs (1)
25internal ICollection<ConfigurationException> Errors => _errors;
System\Configuration\SectionInput.cs (1)
53internal ICollection<ConfigurationException> Errors => _errors;
System.Data.Common (2)
System\Data\Common\DbConnectionStringBuilder.cs (2)
247ICollection<string> keys = (ICollection<string>)Keys;
System.Diagnostics.DiagnosticSource (3)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (1)
38if (tags2 is ICollection<KeyValuePair<string, object?>> tagsCol)
System\Diagnostics\ActivityTagsCollection.cs (2)
94public ICollection<string> Keys 110public ICollection<object?> Values
System.Linq (58)
System\Linq\AnyAll.cs (1)
18if (source is ICollection<TSource> gc)
System\Linq\AppendPrepend.SpeedOpt.cs (6)
18if (_source is ICollection<TSource> c) 77if (_source is ICollection<TSource> collection) 130return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + 1 : -1; 191if (_source is ICollection<TSource> c) 238if (_source is ICollection<TSource> sourceCollection) 283return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + _appendCount + _prependCount : -1;
System\Linq\Concat.cs (6)
72bool hasOnlyCollections = next is ICollection<TSource> && 73_first is ICollection<TSource> && 74_second is ICollection<TSource>; 121/// <c>true</c> if all sources this iterator concatenates implement <see cref="ICollection{TSource}"/>; 137/// <c>true</c> if all sources this iterator concatenates implement <see cref="ICollection{TSource}"/>; 166bool hasOnlyCollections = _hasOnlyCollections && next is ICollection<TSource>;
System\Linq\Concat.SpeedOpt.cs (12)
41ICollection<TSource>? firstCollection = _first as ICollection<TSource>; 42ICollection<TSource>? secondCollection = _second as ICollection<TSource>; 176var collection = source as ICollection<TSource>; 246ICollection<TSource> source = (ICollection<TSource>)node._head; 260var second = (ICollection<TSource>)previous2._second; 270var first = (ICollection<TSource>)previous2._first;
System\Linq\Contains.cs (1)
12if (source is ICollection<TSource> collection)
System\Linq\Count.cs (3)
18if (source is ICollection<TSource> collectionoft) 97/// count can be determined without enumerating; this includes <see cref="ICollection{T}"/>, 110if (source is ICollection<TSource> collectionoft)
System\Linq\DefaultIfEmpty.SpeedOpt.cs (1)
33if (!onlyIfCheap || _source is ICollection<TSource> || _source is ICollection)
System\Linq\Grouping.cs (7)
399int ICollection<TElement>.Count => _count; 401bool ICollection<TElement>.IsReadOnly => true; 403void ICollection<TElement>.Add(TElement item) => ThrowHelper.ThrowNotSupportedException(); 405void ICollection<TElement>.Clear() => ThrowHelper.ThrowNotSupportedException(); 407bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0; 409void ICollection<TElement>.CopyTo(TElement[] array, int arrayIndex) => 412bool ICollection<TElement>.Remove(TElement item) => ThrowHelper.ThrowNotSupportedException_Boolean();
System\Linq\Lookup.cs (6)
266void ICollection<IGrouping<TKey, TElement>>.CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex) 288bool ICollection<IGrouping<TKey, TElement>>.Contains(IGrouping<TKey, TElement> item) 294bool ICollection<IGrouping<TKey, TElement>>.IsReadOnly => true; 295void ICollection<IGrouping<TKey, TElement>>.Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 296void ICollection<IGrouping<TKey, TElement>>.Clear() => throw new NotSupportedException(); 297bool ICollection<IGrouping<TKey, TElement>>.Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
System\Linq\OrderedEnumerable.SpeedOpt.cs (1)
61return !onlyIfCheap || _source is ICollection<TElement> || _source is ICollection ? _source.Count() : -1;
System\Linq\Range.SpeedOpt.cs (3)
104void ICollection<T>.Add(T item) => ThrowHelper.ThrowNotSupportedException(); 105void ICollection<T>.Clear() => ThrowHelper.ThrowNotSupportedException(); 107bool ICollection<T>.Remove(T item) => ThrowHelper.ThrowNotSupportedException_Boolean();
System\Linq\Repeat.SpeedOpt.cs (3)
111void ICollection<TResult>.Add(TResult item) => ThrowHelper.ThrowNotSupportedException(); 112void ICollection<TResult>.Clear() => ThrowHelper.ThrowNotSupportedException(); 114bool ICollection<TResult>.Remove(TResult item) => ThrowHelper.ThrowNotSupportedException_Boolean();
System\Linq\SegmentedArrayBuilder.cs (1)
129if (source is ICollection<T> collection)
System\Linq\SequenceEqual.cs (2)
25if (first is ICollection<TSource> firstCol && second is ICollection<TSource> secondCol)
System\Linq\SkipTake.SpeedOpt.cs (3)
206void ICollection<TSource>.Add(TSource item) => ThrowHelper.ThrowNotSupportedException(); 207void ICollection<TSource>.Clear() => ThrowHelper.ThrowNotSupportedException(); 209bool ICollection<TSource>.Remove(TSource item) => ThrowHelper.ThrowNotSupportedException_Boolean();
System\Linq\ToCollection.cs (2)
19if (source is ICollection<TSource> collection) 45private static TSource[] ICollectionToArray<TSource>(ICollection<TSource> collection)
System.Linq.AsyncEnumerable (7)
System\Linq\GroupBy.cs (7)
437int ICollection<TElement>.Count => _count; 439bool ICollection<TElement>.IsReadOnly => true; 441void ICollection<TElement>.Add(TElement item) => throw new NotSupportedException(); 443void ICollection<TElement>.Clear() => throw new NotSupportedException(); 445bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0; 447void ICollection<TElement>.CopyTo(TElement[] array, int arrayIndex) => 450bool ICollection<TElement>.Remove(TElement item) => throw new NotSupportedException();
System.Linq.Expressions (67)
System\Dynamic\ExpandoObject.cs (14)
327private readonly ICollection<string> _collection; 329public KeyCollectionDebugView(ICollection<string> collection) 466private readonly ICollection<object> _collection; 468public ValueCollectionDebugView(ICollection<object> collection) 617ICollection<string> IDictionary<string, object?>.Keys => new KeyCollection(this); 619ICollection<object?> IDictionary<string, object?>.Values => new ValueCollection(this); 669int ICollection<KeyValuePair<string, object?>>.Count => _count; 671bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 673void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 678void ICollection<KeyValuePair<string, object?>>.Clear() 703bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 713void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) 720ContractUtils.RequiresArrayRange(array, arrayIndex, _count, nameof(arrayIndex), nameof(ICollection<KeyValuePair<string, object>>.Count)); 728bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item)
System\Dynamic\Utils\ContractUtils.cs (1)
87public static void RequiresNotEmpty<T>(ICollection<T> collection, string paramName)
System\Dynamic\Utils\ExpressionUtils.cs (4)
246internal static bool SameElements<T>(ICollection<T>? replacement, IReadOnlyList<T> current) where T : class 278ICollection<T>? replacementCol = replacement as ICollection<T>; 287private static bool SameElementsInCollection<T>(ICollection<T> replacement, IReadOnlyList<T> current) where T : class
System\Linq\Expressions\BlockExpression.cs (14)
73ICollection<ParameterExpression>? vars; 80vars = variables as ICollection<ParameterExpression>; 91ICollection<Expression>? exps = expressions as ICollection<Expression>; 106internal virtual bool SameVariables(ICollection<ParameterExpression>? variables) => 110internal virtual bool SameExpressions(ICollection<Expression> expressions) 208internal override bool SameExpressions(ICollection<Expression> expressions) 261internal override bool SameExpressions(ICollection<Expression> expressions) 328internal override bool SameExpressions(ICollection<Expression> expressions) 412internal override bool SameExpressions(ICollection<Expression> expressions) 476internal override bool SameExpressions(ICollection<Expression> expressions) => 511internal override bool SameVariables(ICollection<ParameterExpression>? variables) => 552internal override bool SameExpressions(ICollection<Expression> expressions) 611internal override bool SameExpressions(ICollection<Expression> expressions) =>
System\Linq\Expressions\DynamicExpression.cs (8)
181ICollection<Expression>? args; 188args = arguments as ICollection<Expression>; 204internal virtual bool SameArguments(ICollection<Expression>? arguments) 504internal override bool SameArguments(ICollection<Expression>? arguments) => 553internal override bool SameArguments(ICollection<Expression>? arguments) 613internal override bool SameArguments(ICollection<Expression>? arguments) 684internal override bool SameArguments(ICollection<Expression>? arguments) 761internal override bool SameArguments(ICollection<Expression>? arguments)
System\Linq\Expressions\LambdaExpression.cs (8)
259ICollection<ParameterExpression>? pars; 266pars = parameters as ICollection<ParameterExpression>; 283internal virtual bool SameParameters(ICollection<ParameterExpression>? parameters) 365internal override bool SameParameters(ICollection<ParameterExpression>? parameters) => 403internal override bool SameParameters(ICollection<ParameterExpression>? parameters) 455internal override bool SameParameters(ICollection<ParameterExpression>? parameters) 520internal override bool SameParameters(ICollection<ParameterExpression>? parameters) 577internal override bool SameParameters(ICollection<ParameterExpression>? parameters) =>
System\Linq\Expressions\MemberBinding.cs (1)
22/// A binding that represents initializing a member of type <see cref="Collections.IList"/> or <see cref="Collections.Generic.ICollection{T}"/> from a list of elements.
System\Linq\Expressions\MethodCallExpression.cs (15)
68ICollection<Expression>? args; 75args = arguments as ICollection<Expression>; 92internal virtual bool SameArguments(ICollection<Expression>? arguments) 186internal override bool SameArguments(ICollection<Expression>? arguments) => 212internal override bool SameArguments(ICollection<Expression>? arguments) => 248internal override bool SameArguments(ICollection<Expression>? arguments) => 284internal override bool SameArguments(ICollection<Expression>? arguments) 336internal override bool SameArguments(ICollection<Expression>? arguments) 403internal override bool SameArguments(ICollection<Expression>? arguments) 476internal override bool SameArguments(ICollection<Expression>? arguments) 555internal override bool SameArguments(ICollection<Expression>? arguments) 628internal override bool SameArguments(ICollection<Expression>? arguments) => 661internal override bool SameArguments(ICollection<Expression>? arguments) 717internal override bool SameArguments(ICollection<Expression>? arguments) 784internal override bool SameArguments(ICollection<Expression>? arguments)
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (2)
52if (collection is ICollection<T> c) 228bool ICollection<T>.IsReadOnly => false;
System.Linq.Parallel (8)
System\Linq\Parallel\QueryOperators\QueryResults.cs (6)
111void ICollection<T>.Add(T item) 116void ICollection<T>.Clear() 121bool ICollection<T>.Contains(T item) 126void ICollection<T>.CopyTo(T[] array, int arrayIndex) 136bool ICollection<T>.IsReadOnly 141bool ICollection<T>.Remove(T item)
System\Linq\ParallelEnumerable.cs (2)
1855if (sourceAsWrapper.WrappedEnumerable is ICollection<TSource> sourceAsCollection) 1926if (sourceAsWrapper.WrappedEnumerable is ICollection<TSource> sourceAsCollection)
System.Net.Http (20)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (20)
307int System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 308bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.IsReadOnly { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 310System.Collections.Generic.ICollection<string> System.Collections.Generic.IDictionary<string, object?>.Keys { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 311System.Collections.Generic.ICollection<object?> System.Collections.Generic.IDictionary<string, object?>.Values { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 317void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Add(System.Collections.Generic.KeyValuePair<string, object> item) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 318void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Clear() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 319bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Contains(System.Collections.Generic.KeyValuePair<string, object> item) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 320void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.CopyTo(System.Collections.Generic.KeyValuePair<string, object>[] array, int arrayIndex) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 321bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Remove(System.Collections.Generic.KeyValuePair<string, object> item) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } 508public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Extensions { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 515public System.Collections.Generic.ICollection<string> NoCacheHeaders { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 520public System.Collections.Generic.ICollection<string> PrivateHeaders { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 541public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Parameters { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 606public System.Collections.Generic.ICollection<string> Allow { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 608public System.Collections.Generic.ICollection<string> ContentEncoding { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 609public System.Collections.Generic.ICollection<string> ContentLanguage { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 745public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Parameters { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 781public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Parameters { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 834public System.Collections.Generic.ICollection<System.Net.Http.Headers.RangeItemHeaderValue> Ranges { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 883public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Parameters { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
System.Net.Security (2)
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (2)
150ICollection<string>? c = collection as ICollection<string>;
System.ObjectModel (2)
System\Collections\Generic\DebugView.cs (2)
10private readonly ICollection<T> _collection; 12public CollectionDebugView(ICollection<T> collection)
System.Private.CoreLib (82)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
35if (source is ICollection<T> ic)
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (5)
229bool ICollection<T>.IsReadOnly => 234void ICollection<T>.Add(T item) => ThrowHelper.ThrowNotSupportedException(); 236void ICollection<T>.Clear() => ThrowHelper.ThrowNotSupportedException(); 238bool ICollection<T>.Contains(T item) 250bool ICollection<T>.Remove(T item)
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (1)
92if (collection is ICollection<T> c)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (17)
101this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 218ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 224ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 254void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => 257bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 268bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 1457bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 1459void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) => 1928bool ICollection<TKey>.IsReadOnly => true; 1930void ICollection<TKey>.Add(TKey item) => 1933void ICollection<TKey>.Clear() => 1939bool ICollection<TKey>.Remove(TKey item) 2123bool ICollection<TValue>.IsReadOnly => true; 2125void ICollection<TValue>.Add(TValue item) => 2128bool ICollection<TValue>.Remove(TValue item) 2134void ICollection<TValue>.Clear() => 2137bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (9)
103if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 364bool ICollection<T>.IsReadOnly => false; 832if (other is ICollection<T> otherAsCollection) 936if (other is ICollection<T> otherAsCollection) 972if (other is ICollection<T> otherAsCollection) 1017if (other is ICollection<T> otherAsCollection) 1061if (other is ICollection<T> otherAsCollection) 1136if (other is ICollection<T> otherAsCollection)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (2)
10private readonly ICollection<T> _collection; 12public ICollectionDebugView(ICollection<T> collection)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionary.cs (2)
24ICollection<TKey> Keys 30ICollection<TValue> Values
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (4)
36private readonly ICollection<TKey> _collection; 38public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 57private readonly ICollection<TValue> _collection; 59public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (4)
66if (collection is ICollection<T> c) 132bool ICollection<T>.IsReadOnly => false; 250if (collection is ICollection<T> c) 821if (collection is ICollection<T> c)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
159bool ICollection<T>.IsReadOnly => items.IsReadOnly;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
44internal static void CopyTo<T>(ICollection<T> collection, Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (4)
58bool ICollection<T>.IsReadOnly => true; 66void ICollection<T>.Add(T value) 71void ICollection<T>.Clear() 81bool ICollection<T>.Remove(T value)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (21)
44ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 51ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 73bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 78void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 83bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 85void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 90void ICollection<KeyValuePair<TKey, TValue>>.Clear() 95bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 249private readonly ICollection<TKey> _collection; 251internal KeyCollection(ICollection<TKey> collection) 258void ICollection<TKey>.Add(TKey item) 263void ICollection<TKey>.Clear() 280bool ICollection<TKey>.IsReadOnly => true; 282bool ICollection<TKey>.Remove(TKey item) 305private readonly ICollection<TValue> _collection; 307internal ValueCollection(ICollection<TValue> collection) 314void ICollection<TValue>.Add(TValue item) 319void ICollection<TValue>.Clear() 324bool ICollection<TValue>.Contains(TValue item) => _collection.Contains(item); 333bool ICollection<TValue>.IsReadOnly => true; 335bool ICollection<TValue>.Remove(TValue item)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (5)
66void ICollection<T>.CopyTo(T[] array, int arrayIndex) => _set.CopyTo(array, arrayIndex); 72bool ICollection<T>.IsReadOnly => true; 96void ICollection<T>.Add(T item) => throw new NotSupportedException(); 99void ICollection<T>.Clear() => throw new NotSupportedException(); 102bool ICollection<T>.Remove(T item) => throw new NotSupportedException();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (2)
25public ICollection<string> Keys => m_names; 26public ICollection<object?> Values => m_values;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
5937if (tasks is ICollection<Task> taskCollection) 6244if (tasks is ICollection<Task<TResult>> taskCollection) 6719if (tasks is ICollection<TTask> tasksAsCollection)
System.Private.DataContractSerialization (15)
System\Runtime\Serialization\CollectionDataContract.cs (1)
804context.IncrementCollectionCountGeneric<T>(xmlwriter, (ICollection<T>)obj);
System\Runtime\Serialization\Globals.cs (1)
254s_typeOfICollectionGeneric ??= typeof(ICollection<>);
System\Runtime\Serialization\ReflectionReader.cs (2)
585Type genericCollectionType = typeof(ICollection<T>); 591((ICollection<T>)resultCollection).Add((T)collectionItem!);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
426internal void IncrementCollectionCountGeneric<T>(XmlWriterDelegator xmlWriter, ICollection<T> collection)
System\Runtime\Serialization\XsdDataContractExporter.cs (10)
101/// <param name="assemblies">A <see cref="ICollection{T}"/> (of <see cref="Assembly"/>) that contains the types to export.</param> 104public void Export(ICollection<Assembly> assemblies) 131/// Transforms the types contained in the <see cref="ICollection{T}"/> passed to this method. 133/// <param name="types">A <see cref="ICollection{T}"/> (of <see cref="Type"/>) that contains the types to export.</param> 136public void Export(ICollection<Type> types) 303/// <param name="assemblies">A <see cref="ICollection{T}"/> of <see cref="Assembly"/> that contains the assemblies with the types to export.</param> 307public bool CanExport(ICollection<Assembly> assemblies) 339/// Gets a value that indicates whether the set of runtime types contained in a <see cref="ICollection{T}"/> can be exported. 341/// <param name="types">A <see cref="ICollection{T}"/> that contains the specified types to export.</param> 345public bool CanExport(ICollection<Type> types)
System.Private.Windows.Core (1)
System\Private\Windows\Ole\DataFormatNames.cs (1)
79where T : ICollection<string>
System.Private.Xml (12)
System\Xml\Xsl\IlGen\GenerateHelper.cs (1)
127IListCount = typeof(ICollection<>).MakeGenericType(storageType).GetMethod("get_Count")!;
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (10)
174bool ICollection<T>.IsReadOnly 182void ICollection<T>.Add(T value) 190void ICollection<T>.Clear() 215bool ICollection<T>.Remove(T value) 670bool ICollection<XPathItem>.IsReadOnly 678void ICollection<XPathItem>.Add(XPathItem value) 686void ICollection<XPathItem>.Clear() 694bool ICollection<XPathItem>.Contains(XPathItem value) 702void ICollection<XPathItem>.CopyTo(XPathItem[] array, int index) 711bool ICollection<XPathItem>.Remove(XPathItem value)
System\Xml\Xsl\Xslt\Scripts.cs (1)
64public ICollection<string> Keys => _backingDictionary.Keys;
System.Private.Xml.Linq (1)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
35if (source is ICollection<T> ic)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
79[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ICollection<>))]
System.Runtime.Serialization.Schema (14)
System\Runtime\Serialization\Schema\CodeExporter.cs (3)
896internal ICollection<CodeTypeReference>? GetKnownTypeReferences(DataContract dataContract) 991ICollection<DataContract> knownTypeContracts = knownContractDictionary.Values; 1231expectedTypeName, expectedTypeNs, GetClrTypeFullName(typeof(IList<>)), GetClrTypeFullName(typeof(ICollection<>)))));
System\Runtime\Serialization\Schema\ImportOptions.cs (4)
19private ICollection<Type>? _referencedTypes; 20private ICollection<Type>? _referencedCollectionTypes; 65public ICollection<Type> ReferencedCollectionTypes => _referencedCollectionTypes ??= new List<Type>(); 70public ICollection<Type> ReferencedTypes => _referencedTypes ??= new List<Type>();
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (7)
93public void Import(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames) 165public bool CanImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName> typeNames) 266public ICollection<CodeTypeReference>? GetKnownTypeReferences(XmlQualifiedName typeName) 300private IList<XmlQualifiedName>? InternalImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName>? typeNames, ICollection<XmlSchemaElement>? elements) 335private bool InternalCanImport(XmlSchemaSet schemas, ICollection<XmlQualifiedName>? typeNames, ICollection<XmlSchemaElement>? elements)
System.Security.Cryptography.Cose (3)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (3)
37private ICollection<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>> HeaderParametersAsCollection => _headerParameters; 43public ICollection<CoseHeaderLabel> Keys => _headerParameters.Keys; 49public ICollection<CoseHeaderValue> Values => _headerParameters.Values;
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (1)
23internal RecipientInfoCollection(ICollection<RecipientInfo> recipientInfos)
System.Security.Principal.Windows (1)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (1)
48bool System.Collections.Generic.ICollection<System.Security.Principal.IdentityReference>.IsReadOnly { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } }
System.ServiceModel.Federation (1)
System\ServiceModel\Federation\WsTrustTokenParameters.cs (1)
108public new ICollection<XmlElement> AdditionalRequestParameters { get; } = new Collection<XmlElement>();
System.ServiceModel.NetFramingBase (4)
System\ServiceModel\Channels\ConnectionPool.cs (4)
683readonly Dictionary<string, ICollection<Uri>> _reverseTable = new Dictionary<string, ICollection<Uri>>(); 689ICollection<Uri> uris; 706ICollection<Uri> uris;
System.ServiceModel.Primitives (11)
netstandard.cs (11)
37bool ICollection<T>.IsReadOnly { get { return default; } } 1730public System.Collections.Generic.ICollection<string> Keys { get { return default; } } 1731bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.IsReadOnly { get { return default; } } 1733public System.Collections.Generic.ICollection<object> Values { get { return default; } } 1741void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Add(System.Collections.Generic.KeyValuePair<string, object> pair) { } 1742bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Contains(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; } 1743void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.CopyTo(System.Collections.Generic.KeyValuePair<string, object>[] array, int index) { } 1744bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Remove(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; } 2146public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.IParameterInspector> ClientParameterInspectors { get { return default; } } 2164public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.IClientMessageInspector> ClientMessageInspectors { get { return default; } } 2166public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.ClientOperation> ClientOperations { get { return default; } }
System.Speech (7)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (7)
303bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.IsReadOnly { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 304System.Collections.Generic.ICollection<string> System.Collections.Generic.IDictionary<System.String,System.Speech.Recognition.SemanticValue>.Keys { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 305System.Collections.Generic.ICollection<System.Speech.Recognition.SemanticValue> System.Collections.Generic.IDictionary<System.String,System.Speech.Recognition.SemanticValue>.Values { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 311void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Add(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 312void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Clear() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 313void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.CopyTo(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>[] array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 314bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Remove(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (16)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
105public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null) 121ICollection<T> children = getChildren(next);
System\Text\Json\Nodes\JsonArray.IList.cs (2)
208void ICollection<JsonNode?>.CopyTo(JsonNode?[] array, int index) => List.CopyTo(array, index); 227bool ICollection<JsonNode?>.IsReadOnly => false;
System\Text\Json\Nodes\JsonObject.cs (1)
38int capacity = properties is ICollection<KeyValuePair<string, JsonNode?>> propertiesCollection ? propertiesCollection.Count : 0;
System\Text\Json\Nodes\JsonObject.IDictionary.cs (6)
161bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) => 181void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) => 201bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key); 206ICollection<string> IDictionary<string, JsonNode?>.Keys => Dictionary.Keys; 211ICollection<JsonNode?> IDictionary<string, JsonNode?>.Values => Dictionary.Values; 237bool ICollection<KeyValuePair<string, JsonNode?>>.IsReadOnly => false;
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
15where TCollection : ICollection<TElement>
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
112else if ((actualTypeToConvert = typeToConvert.GetCompatibleGenericInterface(typeof(ICollection<>))) != null)
System\Text\Json\Serialization\Converters\FSharp\FSharpMapConverter.cs (1)
48int mapCount = ((ICollection<KeyValuePair<TKey, TValue>>)map).Count;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
215/// Creates serialization metadata for types assignable to <see cref="ICollection{T}"/>. 226where TCollection : ICollection<TElement>
System.Text.Json.SourceGeneration (3)
Helpers\KnownTypeSymbols.cs (1)
28public INamedTypeSymbol? ICollectionOfTType => GetOrResolveType(typeof(ICollection<>), ref _ICollectionOfTType);
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
105public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null) 121ICollection<T> children = getChildren(next);
System.Text.RegularExpressions (17)
System\Text\RegularExpressions\CaptureCollection.cs (5)
139void ICollection<Capture>.Add(Capture item) => 142void ICollection<Capture>.Clear() => 145bool ICollection<Capture>.Contains(Capture item) => 148bool ICollection<Capture>.Remove(Capture item) => 158value is Capture other && ((ICollection<Capture>)this).Contains(other);
System\Text\RegularExpressions\CollectionDebuggerProxy.cs (2)
11private readonly ICollection<T> _collection; 13public CollectionDebuggerProxy(ICollection<T> collection)
System\Text\RegularExpressions\GroupCollection.cs (5)
153void ICollection<Group>.Add(Group item) => 156void ICollection<Group>.Clear() => 159bool ICollection<Group>.Contains(Group item) => 162bool ICollection<Group>.Remove(Group item) => 172value is Group other && ((ICollection<Group>)this).Contains(other);
System\Text\RegularExpressions\MatchCollection.cs (5)
149void ICollection<Match>.Add(Match item) => 152void ICollection<Match>.Clear() => 155bool ICollection<Match>.Contains(Match item) 161bool ICollection<Match>.Remove(Match item) => 171value is Match match && ((ICollection<Match>)this).Contains(match);
System.Threading.Tasks.Dataflow (1)
Blocks\TransformManyBlock.cs (1)
440if (_target.IsBounded) UpdateBoundingCountWithOutputCount(count: ((ICollection<TOutput>)outputItems).Count);
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (1)
125internal void AddRangeInternal(ICollection<object> items)
System.Windows.Forms.Design (10)
System\ComponentModel\Design\Serialization\ComponentCache.cs (2)
243public ICollection<ResourceEntry>? Metadata => _metadata; 245public ICollection<ResourceEntry>? Resources => _resources;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
931private void InitiateDrag(Point initialMouseLocation, ICollection<IComponent> dragComps)
System\Windows\Forms\Design\ListAdapter.cs (7)
26int ICollection<T>.Count => _list.Count; 28bool ICollection<T>.IsReadOnly => _list.IsReadOnly; 30void ICollection<T>.Add(T item) => _list.Add(item.OrThrowIfNull()); 31void ICollection<T>.Clear() => _list.Clear(); 32bool ICollection<T>.Contains(T item) => _list.Contains(item); 33void ICollection<T>.CopyTo(T[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); 39bool ICollection<T>.Remove(T item)
System.Windows.Forms.Primitives (1)
System\Windows\Forms\NonNullCollection.cs (1)
34public bool IsReadOnly => ((ICollection<T>)_list).IsReadOnly;
System.Windows.Forms.Tests (3)
System\Windows\Forms\CursorConverterTests.cs (1)
196ICollection<Cursor> values = converter.GetStandardValues().Cast<Cursor>().ToArray();
System\Windows\Forms\ListBindingHelperTests.cs (2)
132yield return new object[] { typeof(ICollection<int>), typeof(ICollection<int>) };
System.Xaml (45)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1301public ArrayItemList(ICollection<T> collection) 1988public FrugalStructList(ICollection<T> collection)
System\Xaml\AttachablePropertyServices.cs (1)
132((ICollection<KeyValuePair<AttachableMemberIdentifier, object>>)instanceProperties).CopyTo(array, index);
System\Xaml\MS\Impl\XmlNsInfo.cs (3)
57private ICollection<AssemblyName> _internalsVisibleTo; 58internal ICollection<AssemblyName> InternalsVisibleTo 244private ICollection<AssemblyName> LoadInternalsVisibleTo()
System\Xaml\NameScope.cs (2)
220public ICollection<string> Keys 239public ICollection<object> Values
System\Xaml\NameScopeDictionary.cs (9)
244int ICollection<KeyValuePair<string, object>>.Count 252bool ICollection<KeyValuePair<string, object>>.IsReadOnly 260void ICollection<KeyValuePair<string, object>>.Clear() 265void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 270bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 275void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 280bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 320ICollection<string> IDictionary<string, object>.Keys 328ICollection<object> IDictionary<string, object>.Values
System\Xaml\Schema\CollectionReflector.cs (2)
113Type genericICollection = GetGenericInterface(type, typeof(ICollection<>), out hasMoreThanOneICollection); 257Type genericICollection = typeof(ICollection<>).MakeGenericType(itemType);
System\Xaml\Schema\TypeReflector.cs (4)
224internal ICollection<XamlMember> ExcludedReadOnlyMembers { get; set; } 464internal void LookupAllMembers(out ICollection<PropertyInfo> newProperties, 465out ICollection<EventInfo> newEvents, out List<XamlMember> knownMembers) 548private ICollection<EventInfo> FilterEvents(EventInfo[] eventList, List<XamlMember> knownMembers)
System\Xaml\Schema\XamlNamespace.cs (3)
22private ICollection<XamlType> _allPublicTypes; 54public ICollection<XamlType> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes(); 204private ICollection<XamlType> LookupAllTypes()
System\Xaml\XamlObjectReader.cs (2)
1620var properties = valueXamlType.GetAllMembers(); 1621var readOnlyProperties = valueXamlType.GetAllExcludedReadOnlyMembers();
System\Xaml\XamlSchemaContext.cs (8)
96public virtual ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 590ICollection<XamlMember> members = type.GetAllMembers(); 784ICollection<AssemblyName> friends = nsInfo.InternalsVisibleTo; 1439void ICollection<T>.Add(T item) 1444bool ICollection<T>.Contains(T item) 1457void ICollection<T>.CopyTo(T[] array, int arrayIndex) 1465bool ICollection<T>.Remove(T item) 1470bool ICollection<T>.IsReadOnly
System\Xaml\XamlType.cs (7)
362public ICollection<XamlMember> GetAllMembers() 411public ICollection<XamlMember> GetAllAttachableMembers() 632internal ICollection<XamlMember> GetAllExcludedReadOnlyMembers() 1066ICollection<PropertyInfo> properties; 1067ICollection<EventInfo> events; 1646private ICollection<XamlMember> LookupAllExcludedReadOnlyMembers() 1654ICollection<XamlMember> allMembers = GetAllMembers();
System\Xaml\XamlXmlWriter.cs (2)
1998var properties = objectXamlType.GetAllMembers(); 1999var readOnlyProperties = objectXamlType.GetAllExcludedReadOnlyMembers();
System.Xaml.Tests (40)
System\Xaml\Schema\XamlTypeInvokerTests.cs (7)
245typeof(ICollection<int>).GetMethod(nameof(ICollection<int>.Add)) 251typeof(ICollection<Array>).GetMethod(nameof(ICollection<Array>.Add)) 297typeof(ICollection<int>).GetMethod(nameof(ICollection<int>.Add)) 464new XamlTypeInvoker(new XamlType(typeof(ICollection<int>), new XamlSchemaContext())),
System\Xaml\XamlTypeTests.cs (33)
1750yield return new object?[] { new SubXamlType(typeof(ICollection<int>), new XamlSchemaContext()), XamlCollectionKind.Collection }; 3101int ICollection<object>.Count => throw new NotImplementedException(); 3103int ICollection<int>.Count => throw new NotImplementedException(); 3105bool ICollection<object>.IsReadOnly => throw new NotImplementedException(); 3107bool ICollection<int>.IsReadOnly => throw new NotImplementedException(); 3109void ICollection<object>.Add(object item) => throw new NotImplementedException(); 3111void ICollection<int>.Add(int item) => throw new NotImplementedException(); 3113void ICollection<object>.Clear() => throw new NotImplementedException(); 3115void ICollection<int>.Clear() => throw new NotImplementedException(); 3117bool ICollection<object>.Contains(object item) => throw new NotImplementedException(); 3119bool ICollection<int>.Contains(int item) => throw new NotImplementedException(); 3121void ICollection<object>.CopyTo(object[] array, int arrayIndex) => throw new NotImplementedException(); 3123void ICollection<int>.CopyTo(int[] array, int arrayIndex) => throw new NotImplementedException(); 3131bool ICollection<object>.Remove(object item) => throw new NotImplementedException(); 3133bool ICollection<int>.Remove(int item) => throw new NotImplementedException(); 3142ICollection<string> IDictionary<string, int>.Keys => throw new NotImplementedException(); 3144ICollection<int> IDictionary<int, string>.Keys => throw new NotImplementedException(); 3146ICollection<int> IDictionary<string, int>.Values => throw new NotImplementedException(); 3148ICollection<string> IDictionary<int, string>.Values => throw new NotImplementedException(); 3150int ICollection<KeyValuePair<string, int>>.Count => throw new NotImplementedException(); 3152int ICollection<KeyValuePair<int, string>>.Count => throw new NotImplementedException(); 3154bool ICollection<KeyValuePair<string, int>>.IsReadOnly => throw new NotImplementedException(); 3156bool ICollection<KeyValuePair<int, string>>.IsReadOnly => throw new NotImplementedException(); 3160void ICollection<KeyValuePair<string, int>>.Add(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3164void ICollection<KeyValuePair<int, string>>.Add(KeyValuePair<int, string> item) => throw new NotImplementedException(); 3166void ICollection<KeyValuePair<string, int>>.Clear() => throw new NotImplementedException(); 3168void ICollection<KeyValuePair<int, string>>.Clear() => throw new NotImplementedException(); 3170bool ICollection<KeyValuePair<string, int>>.Contains(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3172bool ICollection<KeyValuePair<int, string>>.Contains(KeyValuePair<int, string> item) => throw new NotImplementedException(); 3178void ICollection<KeyValuePair<string, int>>.CopyTo(KeyValuePair<string, int>[] array, int arrayIndex) => throw new NotImplementedException(); 3180void ICollection<KeyValuePair<int, string>>.CopyTo(KeyValuePair<int, string>[] array, int arrayIndex) => throw new NotImplementedException(); 3190bool ICollection<KeyValuePair<string, int>>.Remove(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3194bool ICollection<KeyValuePair<int, string>>.Remove(KeyValuePair<int, string> item) => throw new NotImplementedException();
Templates.Blazor.Tests (2)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
src\Shared\E2ETesting\BrowserFixture.cs (1)
70var browsers = _browsers.Values;
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
src\Shared\E2ETesting\BrowserFixture.cs (1)
70var browsers = _browsers.Values;
Templates.Mvc.Tests (3)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
src\Shared\E2ETesting\BrowserFixture.cs (1)
70var browsers = _browsers.Values;
Templates.Tests (3)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
385var certsFromDisk = GetCertsFromDisk(); 431private static ICollection<X509Certificate2> GetCertsFromDisk()
src\Shared\E2ETesting\BrowserFixture.cs (1)
70var browsers = _browsers.Values;
Test.Utilities (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
Text.Analyzers (130)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class 38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
87if (items is ICollection<T> collection && collection.Count == 0) 201if (source is ICollection<T> genericCollection) 229public static bool IsEmpty<T>(this ICollection<T> source) 240/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 248/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
12/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 23where TCollection : ICollection<T> 27where TCollection : ICollection<T> 31where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
21private readonly ICollection<T> _collection; 23public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
43private readonly ICollection<TKey> _collection; 45public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 64private readonly ICollection<TValue> _collection; 66public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (4)
45ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 47ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
30bool ICollection<TKey>.IsReadOnly => false; 36void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
30bool ICollection<TValue>.IsReadOnly => false; 36void ICollection<TValue>.Add(TValue item) 51bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
26bool ICollection<TKey>.IsReadOnly => true; 44void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 50void ICollection<TKey>.Add(TKey item) 53void ICollection<TKey>.Clear() 56bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
66readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 68readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
26bool ICollection<TValue>.IsReadOnly => true; 44void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 50void ICollection<TValue>.Add(TValue item) 53void ICollection<TValue>.Clear() 56bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
89bool ICollection<T>.IsReadOnly => true; 346void ICollection<T>.CopyTo(T[] array, int arrayIndex) 385void ICollection<T>.Add(T item) 388void ICollection<T>.Clear() 391bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (3)
36bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 117void ICollection<T>.Add(T item) 120void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
60readonly bool ICollection<T>.IsReadOnly => false; 271void ICollection<T>.Add(T item) 272=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 274readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 275=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (5)
90bool ICollection<T>.IsReadOnly => true; 165if (items is ICollection<T> { Count: 0 }) 651void ICollection<T>.Add(T item) 654void ICollection<T>.Clear() 657bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
28bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
39readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (8)
126int ICollection<T>.Count => Length; 163void ICollection<T>.CopyTo(T[] array, int arrayIndex) 167ICollection<T> collection = _items[i]; 196void ICollection<T>.Add(T value) 211void ICollection<T>.Clear() 228bool ICollection<T>.Contains(T value) 230foreach (ICollection<T> collection in _items) 284bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1341bool ICollection<TKey>.IsReadOnly => true; 1343void ICollection<TKey>.Add(TKey item) 1346void ICollection<TKey>.Clear() 1352bool ICollection<TKey>.Remove(TKey item) 1549bool ICollection<TValue>.IsReadOnly => true; 1551void ICollection<TValue>.Add(TValue item) 1554bool ICollection<TValue>.Remove(TValue item) 1560void ICollection<TValue>.Clear() 1563bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (8)
120if (collection is ICollection<T> coll) 196void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 360bool ICollection<T>.IsReadOnly => false; 446if (other is ICollection<T> otherAsCollection) 585if (other is ICollection<T> otherAsCollection) 634if (other is ICollection<T> otherAsCollection) 678if (other is ICollection<T> otherAsCollection) 771other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
87if (collection is ICollection<T> c) 186bool ICollection<T>.IsReadOnly => false; 304if (collection is ICollection<T> c) 904if (collection is ICollection<T> c)
src\Dependencies\Collections\Specialized\SpecializedCollections.cs (5)
23public static ICollection<T> EmptyCollection<T>() 70public static ICollection<T> SingletonCollection<T>(T value) 95public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 99: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
18public static readonly ICollection<T> Instance = new Collection<T>();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (2)
41public ICollection<TKey> Keys 63public ICollection<TValue> Values
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
17where TUnderlying : ICollection<T>
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
50if (source is ICollection<TSource> collectionoft) 87if (source is ICollection<TSource> collectionoft) 124if (source is ICollection<TSource> collectionoft)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
136void ICollection<T>.Add(T item)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
297private static bool IsSubsetOfCollection<T>(ImmutableArray<T> set1, ICollection<T> set2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IAssemblySymbolExtensions.cs (1)
52var typeNames = a.TypeNames;
xunit.assert (1)
Sdk\Exceptions\SingleException.cs (1)
79 ICollection<int> matchIndices)
xunit.console (4)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (3)
222var runtimes = targetLibraryJson.ValueAsJsonObject(DependencyContextStrings.RuntimeAssembliesKey)?.Keys; 223var natives = targetLibraryJson.ValueAsJsonObject(DependencyContextStrings.NativeLibrariesKey)?.Keys; 224var compilations = targetLibraryJson.ValueAsJsonObject(DependencyContextStrings.CompileTimeAssembliesKey)?.Keys;
common\Json.cs (1)
730public ICollection<string> Keys