7 interfaces inheriting from ICollection
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\IExtensionCollection.cs (1)
11public interface IExtensionCollection<T> : ICollection<IExtension<T>>
Microsoft.Build (1)
Collections\RetrievableEntryHashSet\IRetrievableEntryHashSet.cs (1)
18ICollection<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>
157 implementations of ICollection
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>
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)
347private 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.Build (6)
Construction\ProjectElementContainer.cs (1)
786internal sealed class ProjectElementSiblingSubTypeCollection<T> : ICollection<T>, ICollection
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (1)
105private sealed class ValuesCollection : ICollection<T>
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (1)
162private class ValuesCollection : ICollection<ProjectPropertyInstance>
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
179private sealed class ListConverter : ICollection<T>
ReadOnlyCollection.cs (1)
23internal sealed class ReadOnlyCollection<T> : ICollection<T>, ICollection
ReadOnlyEmptyCollection.cs (1)
20internal class ReadOnlyEmptyCollection<T> : ICollection<T>, ICollection
Microsoft.Build.Framework (6)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
SegmentedDictionary`2.cs (2)
1258public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1458public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
Microsoft.Build.Tasks.Core (2)
ReadOnlyCollection.cs (1)
23internal sealed class ReadOnlyCollection<T> : ICollection<T>, ICollection
ReadOnlyEmptyCollection.cs (1)
20internal class ReadOnlyEmptyCollection<T> : ICollection<T>, ICollection
Microsoft.Build.Utilities.Core (1)
ReadOnlyEmptyCollection.cs (1)
20internal class ReadOnlyEmptyCollection<T> : ICollection<T>, ICollection
Microsoft.CodeAnalysis (13)
Collections\IdentifierCollection.Collection.cs (1)
15private abstract class CollectionBase : ICollection<string>
Collections\UnionCollection.cs (1)
25internal class UnionCollection<T> : ICollection<T>
InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
14internal class Collection<T> : Enumerable<T>, ICollection<T>
InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
14internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
1292public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1500public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\SegmentedHashSet`1.cs (1)
24internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
18internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
16internal sealed class ConcurrentSet<T> : ICollection<T>
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
14internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
14internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
1292public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1500public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\SegmentedHashSet`1.cs (1)
24internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
18internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.Collections.Package (7)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
SegmentedDictionary`2.cs (2)
1292public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1500public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
SegmentedHashSet`1.cs (1)
24internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
18internal sealed partial class ArrayBuilder<T> : IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
18internal 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\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
14internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
14internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
1292public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1500public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\SegmentedHashSet`1.cs (1)
24internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
18internal 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\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
14internal class Collection<T> : Enumerable<T>, ICollection<T>
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
14internal class Collection<TUnderlying, T> : Enumerable<TUnderlying, T>, ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
16public readonly struct KeyCollection : ICollection<TKey>, IReadOnlyCollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
16public readonly struct ValueCollection : ICollection<TValue>, IReadOnlyCollection<TValue>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
13public readonly partial struct KeyCollection : IReadOnlyCollection<TKey>, ICollection<TKey>, ICollection
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
13public readonly partial struct ValueCollection : IReadOnlyCollection<TValue>, ICollection<TValue>, ICollection
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
1292public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 1500public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue>
src\Dependencies\Collections\SegmentedHashSet`1.cs (1)
24internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
18internal 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
MSBuild (1)
ReadOnlyEmptyCollection.cs (1)
20internal class ReadOnlyEmptyCollection<T> : ICollection<T>, ICollection
MSBuildTaskHost (1)
ReadOnlyEmptyCollection.cs (1)
20internal class ReadOnlyEmptyCollection<T> : ICollection<T>, ICollection
PresentationCore (6)
MS\Internal\FontFace\TypefaceCollection.cs (1)
12internal unsafe struct TypefaceCollection : ICollection<Typeface>
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
11internal class SequentialUshortCollection : ICollection<ushort>
System\Windows\Ink\StrokeCollection.cs (1)
842internal class ReadOnlyStrokeCollection : StrokeCollection, ICollection<Stroke>, IList
System\Windows\Media\Animation\TimelineClockCollection.cs (1)
10public class ClockCollection : ICollection<Clock>
System\Windows\Media\Fonts.cs (1)
279private struct TypefaceCollection : ICollection<Typeface>
System\Windows\Media\GlyphTypeface.cs (1)
1864private class ValueCollection : ICollection<double>
PresentationFramework (5)
MS\Internal\WeakDictionary.cs (2)
17private class KeyCollection<KeyType, ValueType> : ICollection<KeyType> where KeyType : class 104private class ValueCollection<KeyType, ValueType> : ICollection<ValueType> where KeyType : class
MS\Internal\WeakHashSet.cs (1)
16internal class WeakHashSet<T> : ICollection<T> where T : class
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
23public class XmlNamespaceMappingCollection : XmlNamespaceManager, ICollection<XmlNamespaceMapping>, IAddChildInternal
System\Windows\Documents\TextElementCollection.cs (1)
17public class TextElementCollection<TextElementType> : IList, ICollection<TextElementType> where TextElementType : TextElement
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)
517public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> 678public 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)
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
33public sealed class HttpHeaderValueCollection<T> : ICollection<T> where T : class
System\Net\Http\Headers\ObjectCollection.cs (1)
21internal abstract class ObjectCollection<T> : ICollection<T> where T : class
System.Net.HttpListener (1)
System\Net\HttpListenerPrefixCollection.cs (1)
29public class HttpListenerPrefixCollection : ICollection<string>
System.Net.NetworkInformation (4)
System\Net\NetworkInformation\GatewayIPAddressInformationCollection.cs (1)
8public class GatewayIPAddressInformationCollection : ICollection<GatewayIPAddressInformation>
System\Net\NetworkInformation\IPAddressInformationCollection.cs (1)
8public class IPAddressInformationCollection : ICollection<IPAddressInformation>
System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs (1)
8public class MulticastIPAddressInformationCollection : ICollection<MulticastIPAddressInformation>
System\Net\NetworkInformation\UnicastIPAddressInformationCollection.cs (1)
8public class UnicastIPAddressInformationCollection : ICollection<UnicastIPAddressInformation>
System.Net.Primitives (2)
System\Net\CookieCollection.cs (1)
15public class CookieCollection : ICollection<Cookie>, IReadOnlyCollection<Cookie>, ICollection
System\Net\NetworkInformation\IPAddressCollection.cs (1)
8public class IPAddressCollection : ICollection<IPAddress>
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>
3754 references to ICollection
Aspire.Dashboard (2)
Components\Dialogs\TextVisualizerDialog.razor.cs (2)
42public ICollection<StringLogLine> FormattedLines { get; set; } = []; 112private ICollection<StringLogLine> GetLines()
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)
HtmlGenerationWebSite (1)
Models\Order.cs (1)
20public ICollection<string> PaymentMethod
Identity.DefaultUI.WebSite (5)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
57public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (4)
134public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 138public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 142public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 146public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<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; }
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)
830public ICollection<string> Keys => _innerHeaders.Keys; 831public 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)
1038public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
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)
266case 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)
266case 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 (2)
GridItemsProviderResult.cs (1)
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.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
246public ICollection<EndpointDataSource> DataSources { get; }
Microsoft.AspNetCore.HeaderParsing (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
122var 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 (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
482public 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 (5)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
57public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (4)
134public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 138public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 142public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 146public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>();
Microsoft.AspNetCore.Identity.InMemory.Test (5)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
57public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (4)
134public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 138public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 142public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 146public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>();
Microsoft.AspNetCore.Identity.Test (5)
src\Identity\test\Shared\PocoModel\PocoRole.cs (1)
57public virtual ICollection<PocoRoleClaim<TKey>> Claims { get; private set; } = new List<PocoRoleClaim<TKey>>();
src\Identity\test\Shared\PocoModel\PocoUser.cs (4)
134public virtual ICollection<PocoUserRole<TKey>> Roles { get; private set; } = new List<PocoUserRole<TKey>>(); 138public virtual ICollection<PocoUserClaim<TKey>> Claims { get; private set; } = new List<PocoUserClaim<TKey>>(); 142public virtual ICollection<PocoUserLogin<TKey>> Logins { get; private set; } = new List<PocoUserLogin<TKey>>(); 146public virtual ICollection<PocoUserToken<TKey>> Tokens { get; private set; } = new List<PocoUserToken<TKey>>();
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 (18)
ApiResponseTypeProviderTest.cs (17)
32var result = provider.GetApiResponseTypes(actionDescriptor); 97var result = provider.GetApiResponseTypes(actionDescriptor); 155var result = provider.GetApiResponseTypes(actionDescriptor); 206var result = provider.GetApiResponseTypes(actionDescriptor); 245var result = provider.GetApiResponseTypes(actionDescriptor); 301var result = provider.GetApiResponseTypes(actionDescriptor); 344var result = provider.GetApiResponseTypes(actionDescriptor); 396var result = provider.GetApiResponseTypes(actionDescriptor); 439var result = provider.GetApiResponseTypes(actionDescriptor); 490var result = provider.GetApiResponseTypes(actionDescriptor); 536var result = provider.GetApiResponseTypes(actionDescriptor); 582var result = provider.GetApiResponseTypes(actionDescriptor); 632var result = provider.GetApiResponseTypes(actionDescriptor); 662var result = provider.GetApiResponseTypes(actionDescriptor); 688var result = provider.GetApiResponseTypes(actionDescriptor); 721var result = provider.GetApiResponseTypes(actionDescriptor); 761var result = provider.GetApiResponseTypes(actionDescriptor);
EndpointMetadataApiDescriptionProviderTest.cs (1)
1627public 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 (26)
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 (2)
1337[InlineData(typeof(ICollection<int>))] 1361[InlineData(typeof(ICollection<int>))]
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)
178public ICollection<EndpointDataSource> DataSources { get; } 348public ICollection<string> Addresses { get; set; }
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
363public 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) 62bool 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) 107bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item));
OwinEnvironment.cs (9)
158ICollection<string> IDictionary<string, object>.Keys 186ICollection<object> IDictionary<string, object>.Values 239void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 244void ICollection<KeyValuePair<string, object>>.Clear() 250bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 255void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 271int ICollection<KeyValuePair<string, object>>.Count 276bool ICollection<KeyValuePair<string, object>>.IsReadOnly 281bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Owin.Tests (2)
OwinEnvironmentTests.cs (2)
141var 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)
353void 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)
1038public 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)
266case 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 (292)
BackEnd\BuildManager\BuildParameters.cs (1)
579public ICollection<Toolset> Toolsets => ToolsetProvider.Toolsets;
BackEnd\BuildManager\BuildRequestData.cs (3)
193public ICollection<ProjectPropertyInstance> GlobalProperties => (GlobalPropertiesDictionary == null) ? 194(ICollection<ProjectPropertyInstance>)ReadOnlyEmptyCollection<ProjectPropertyInstance>.Instance : 237public new ICollection<string> TargetNames => base.TargetNames;
BackEnd\BuildManager\BuildRequestDataBase.cs (3)
12ICollection<string> targetNames, 33public ICollection<string> TargetNames { get; protected set; } 58ICollection<string> targetNames,
BackEnd\Components\Logging\ILoggingService.cs (8)
102ICollection<ILogger> Loggers 112ICollection<LoggerDescription> LoggerDescriptions 121ICollection<string> RegisteredLoggerTypeNames 130ICollection<string> RegisteredSinkNames 282ICollection<string> GetWarningsAsErrors(BuildEventContext context); 289ICollection<string> GetWarningsNotAsErrors(BuildEventContext context); 296ICollection<string> GetWarningsAsMessages(BuildEventContext context); 330void InitializeNodeLoggers(ICollection<LoggerDescription> loggerDescriptions, IBuildEventSink forwardingLoggerSink, int nodeId);
BackEnd\Components\Logging\LoggingService.cs (9)
486public ICollection<LoggerDescription> LoggerDescriptions => _loggerDescriptions; 491public ICollection<ILogger> Loggers => _loggers; 654public ICollection<string> GetWarningsAsErrors(BuildEventContext context) 665public ICollection<string> GetWarningsNotAsErrors(BuildEventContext context) 676public ICollection<string> GetWarningsAsMessages(BuildEventContext context) 691private ICollection<string> GetWarningsForProject(BuildEventContext context, IDictionary<WarningsConfigKey, ISet<string>> warningsByProject, ISet<string> warnings) 771public ICollection<string> RegisteredLoggerTypeNames 797public ICollection<string> RegisteredSinkNames 1195public void InitializeNodeLoggers(ICollection<LoggerDescription> descriptions, IBuildEventSink forwardingLoggerSink, int nodeId)
BackEnd\Components\Logging\TaskLoggingContext.cs (3)
154internal ICollection<string> GetWarningsAsErrors() 159internal ICollection<string> GetWarningsNotAsErrors() 164internal ICollection<string> GetWarningsAsMessages()
BackEnd\Components\ProjectCache\ProjectCacheService.cs (7)
101ICollection<string> requestedTargets, 129ICollection<string> requestedTargets, 163ICollection<string> requestedTargets, 179ICollection<ProjectItemInstance> items = projectInstance.GetItems(ItemTypeNames.ProjectCachePlugin); 198ICollection<string> requestedTargets, 534ICollection<string> requestedTargetsList = buildRequestConfiguration.RequestedTargets as ICollection<string> ?? buildRequestConfiguration.RequestedTargets.ToList();
BackEnd\Components\RequestBuilder\BatchingEngine.cs (7)
147Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched = GetItemListsToBeBatched(consumedMetadataReferences, consumedItemReferences, lookup, elementLocation); 206private static Dictionary<string, ICollection<ProjectItemInstance>> GetItemListsToBeBatched( 215var itemListsToBeBatched = new Dictionary<string, ICollection<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default); 257ICollection<ProjectItemInstance> items = lookup.GetItems(consumedItemName); 302Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched, 313foreach (KeyValuePair<string, ICollection<ProjectItemInstance>> entry in itemListsToBeBatched) 318ICollection<ProjectItemInstance> items = entry.Value ?? lookup.GetItems(itemName);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (4)
252ICollection<ProjectItemInstance> group = bucket.Lookup.GetItems(child.ItemType); 299ICollection<ProjectItemInstance> group = bucket.Lookup.GetItems(child.ItemType); 547ICollection<ProjectItemInstance> items, 615ICollection<ProjectItemInstance> group,
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
78ICollection<string> itemNames,
BackEnd\Components\RequestBuilder\Lookup.cs (11)
465public ICollection<ProjectItemInstance> GetItems(string itemType) 474ICollection<ProjectItemInstance> groupFound = null; 481ICollection<ProjectItemInstance> adds = scope.Adds[itemType]; 492ICollection<ProjectItemInstance> removes = scope.Removes[itemType]; 598internal void PopulateWithItems(string itemType, ICollection<ProjectItemInstance> group) 601ICollection<ProjectItemInstance> existing = PrimaryTable[itemType]; 640internal void AddNewItemsOfItemType(string itemType, ICollection<ProjectItemInstance> group, bool doNotAddDuplicates = false, Action<IList> logFunction = null) 663var existingItems = GetItems(itemType); 747internal void ModifyItems(string itemType, ICollection<ProjectItemInstance> group, MetadataModifications metadataChanges) 894ICollection<ProjectItemInstance> existing = table[itemType]; 957ICollection<ProjectItemInstance> tableOfItemsOfSameType = table[item.ItemType];
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
1028var projectReferenceItems = _buildRequestEntry.RequestConfiguration.Project.GetItems(ItemTypeNames.ProjectReference); 1195ICollection<ProjectItemInstance> items = bucket.Expander.ExpandIntoItemsLeaveEscaped(outputItemSpec, itemFactory, ExpanderOptions.ExpandItems, taskItemInstance.TaskParameterLocation);
BackEnd\Components\RequestBuilder\TaskHost.cs (6)
703private ICollection<string> _warningsAsErrors; 709private ICollection<string> WarningsAsErrors 723private ICollection<string> _warningsNotAsErrors; 729private ICollection<string> WarningsNotAsErrors 743private ICollection<string> _warningsAsMessages; 749private ICollection<string> WarningsAsMessages
BackEnd\Node\OutOfProcNode.cs (1)
733ICollection<Toolset> parentToolSets = _buildParameters.ToolsetProvider.Toolsets;
BackEnd\Shared\BuildRequest.cs (1)
177ICollection<string> escapedTargets,
BackEnd\Shared\BuildRequestConfiguration.cs (1)
831var items = Project.GetItems(ItemTypeNames.GraphIsolationExemptReference);
Collections\ArrayDictionary.cs (2)
68public ICollection<TKey> Keys => keys; 76public ICollection<TValue> Values => values;
Collections\CopyOnWritePropertyDictionary.cs (7)
68ICollection<string> IDictionary<string, T>.Keys => ((IDictionary<string, T>)_backing).Keys; 73ICollection<T> IDictionary<string, T>.Values => ((IDictionary<string, T>)_backing).Values; 78bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false; 272void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item) 280bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item) 293void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) 301bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
Collections\IItemDictionary.cs (2)
30ICollection<string> ItemTypes { get; } 41ICollection<T> this[string itemType] { get; }
Collections\ItemDictionary.cs (7)
94public ICollection<string> ItemTypes 114public ICollection<T> this[string itemtype] 138foreach (ICollection<T> list in _itemLists.Values) 216public ICollection<T> GetItems(string itemType) 218ICollection<T> result = this[itemType]; 417private IEnumerator<ICollection<T>> _listEnumerator; 427internal Enumerator(IEnumerable<ICollection<T>> listEnumerable)
Collections\PropertyDictionary.cs (14)
109ICollection<string> IDictionary<string, T>.Keys 124ICollection<T> IDictionary<string, T>.Values 139int ICollection<KeyValuePair<string, T>>.Count => Count; 145bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false; 156return ((ICollection<T>)_properties).Count; 232((ICollection<T>)_properties).Clear(); 395void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item) 403void ICollection<KeyValuePair<string, T>>.Clear() 411bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item) 427void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) 435bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item) 522var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default); 537foreach (var kvp in (ICollection<T>)_properties) 557foreach (T property in (ICollection<T>)_properties)
Collections\ReadOnlyConvertingDictionary.cs (2)
49public ICollection<K> Keys => _backing.Keys; 54public ICollection<N> Values
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (10)
176ICollection<T> coll = collection as ICollection<T>; 203public ICollection<string> Keys 221public ICollection<T> Values 244/// Add item to this hashset. This is the explicit implementation of the <see cref="ICollection{T}" /> 248void ICollection<T>.Add(T item) 285bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> entry) 399bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> entry) 605void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> entry) 636void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int index)
Construction\ProjectChooseElement.cs (1)
61public ICollection<ProjectWhenElement> WhenElements => GetChildrenOfType<ProjectWhenElement>();
Construction\ProjectElementContainer.cs (2)
76public ICollection<ProjectElement> Children 100public ICollection<ProjectElement> ChildrenReversed
Construction\ProjectImportGroupElement.cs (1)
52public ICollection<ProjectImportElement> Imports => GetChildrenOfType<ProjectImportElement>();
Construction\ProjectItemDefinitionElement.cs (1)
53public ICollection<ProjectMetadataElement> Metadata => GetChildrenOfType<ProjectMetadataElement>();
Construction\ProjectItemDefinitionGroupElement.cs (1)
48public ICollection<ProjectItemDefinitionElement> ItemDefinitions => GetChildrenOfType<ProjectItemDefinitionElement>();
Construction\ProjectItemElement.cs (1)
286public ICollection<ProjectMetadataElement> Metadata => GetChildrenOfType<ProjectMetadataElement>();
Construction\ProjectItemGroupElement.cs (1)
57public ICollection<ProjectItemElement> Items => GetChildrenOfType<ProjectItemElement>();
Construction\ProjectOtherwiseElement.cs (3)
58public ICollection<ProjectItemGroupElement> ItemGroups => GetChildrenOfType<ProjectItemGroupElement>(); 63public ICollection<ProjectPropertyGroupElement> PropertyGroups => GetChildrenOfType<ProjectPropertyGroupElement>(); 68public ICollection<ProjectChooseElement> ChooseElements => GetChildrenOfType<ProjectChooseElement>();
Construction\ProjectPropertyGroupElement.cs (2)
48public ICollection<ProjectPropertyElement> Properties => GetChildrenOfType<ProjectPropertyElement>(); 53public ICollection<ProjectPropertyElement> PropertiesReversed => GetChildrenReversedOfType<ProjectPropertyElement>();
Construction\ProjectRootElement.cs (15)
290public ICollection<ProjectChooseElement> ChooseElements => GetChildrenOfType<ProjectChooseElement>(); 295public ICollection<ProjectItemDefinitionGroupElement> ItemDefinitionGroups => GetChildrenOfType<ProjectItemDefinitionGroupElement>(); 300public ICollection<ProjectItemDefinitionElement> ItemDefinitions => new ReadOnlyCollection<ProjectItemDefinitionElement>(GetAllChildrenOfType<ProjectItemDefinitionElement>()); 306public ICollection<ProjectItemGroupElement> ItemGroups => GetChildrenOfType<ProjectItemGroupElement>(); 312public ICollection<ProjectItemElement> Items => new ReadOnlyCollection<ProjectItemElement>(GetAllChildrenOfType<ProjectItemElement>()); 317public ICollection<ProjectImportGroupElement> ImportGroups => GetChildrenOfType<ProjectImportGroupElement>(); 322public ICollection<ProjectImportElement> Imports => new ReadOnlyCollection<ProjectImportElement>(GetAllChildrenOfType<ProjectImportElement>()); 328public ICollection<ProjectPropertyGroupElement> PropertyGroups => GetChildrenOfType<ProjectPropertyGroupElement>(); 334public ICollection<ProjectPropertyElement> Properties => new ReadOnlyCollection<ProjectPropertyElement>(GetAllChildrenOfType<ProjectPropertyElement>()); 339public ICollection<ProjectTargetElement> Targets => GetChildrenOfType<ProjectTargetElement>(); 344public ICollection<ProjectUsingTaskElement> UsingTasks => GetChildrenOfType<ProjectUsingTaskElement>(); 349public ICollection<ProjectItemGroupElement> ItemGroupsReversed => GetChildrenReversedOfType<ProjectItemGroupElement>(); 354public ICollection<ProjectItemDefinitionGroupElement> ItemDefinitionGroupsReversed => GetChildrenReversedOfType<ProjectItemDefinitionGroupElement>(); 359public ICollection<ProjectImportGroupElement> ImportGroupsReversed => GetChildrenReversedOfType<ProjectImportGroupElement>(); 364public ICollection<ProjectPropertyGroupElement> PropertyGroupsReversed => GetChildrenReversedOfType<ProjectPropertyGroupElement>();
Construction\ProjectTargetElement.cs (4)
59public ICollection<ProjectItemGroupElement> ItemGroups => GetChildrenOfType<ProjectItemGroupElement>(); 64public ICollection<ProjectPropertyGroupElement> PropertyGroups => GetChildrenOfType<ProjectPropertyGroupElement>(); 69public ICollection<ProjectTaskElement> Tasks => GetChildrenOfType<ProjectTaskElement>(); 74public ICollection<ProjectOnErrorElement> OnErrors => GetChildrenOfType<ProjectOnErrorElement>();
Construction\ProjectTaskElement.cs (1)
128public ICollection<ProjectOutputElement> Outputs => GetChildrenOfType<ProjectOutputElement>();
Construction\ProjectWhenElement.cs (3)
49public ICollection<ProjectChooseElement> ChooseElements => GetChildrenOfType<ProjectChooseElement>(); 54public ICollection<ProjectItemGroupElement> ItemGroups => GetChildrenOfType<ProjectItemGroupElement>(); 59public ICollection<ProjectPropertyGroupElement> PropertyGroups => GetChildrenOfType<ProjectPropertyGroupElement>();
Construction\UsingTaskParameterGroupElement.cs (1)
60public ICollection<ProjectUsingTaskParameterElement> Parameters => GetChildrenOfType<ProjectUsingTaskParameterElement>();
CopyOnWriteDictionary.cs (2)
114public ICollection<string> Keys => ((IDictionary<string, V>)_backing).Keys; 119public ICollection<V> Values => ((IDictionary<string, V>)_backing).Values;
Definition\BuiltInMetadata.cs (1)
33internal static ICollection<string> MetadataNames
Definition\Project.cs (30)
629public ICollection<string> ItemTypes => implementation.ItemTypes; 635public ICollection<ProjectProperty> Properties => implementation.Properties; 665public ICollection<ProjectItem> Items => implementation.Items; 675public ICollection<ProjectItem> ItemsIgnoringCondition => implementation.ItemsIgnoringCondition; 708public ICollection<ProjectProperty> AllEvaluatedProperties => implementation.AllEvaluatedProperties; 717public ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata => implementation.AllEvaluatedItemDefinitionMetadata; 728public ICollection<ProjectItem> AllEvaluatedItems => implementation.AllEvaluatedItems; 1249public ICollection<ProjectItem> GetItems(string itemType) 1262public ICollection<ProjectItem> GetItemsIgnoringCondition(string itemType) 1278public ICollection<ProjectItem> GetItemsByEvaluatedInclude(string evaluatedInclude) 2170public override ICollection<string> ItemTypes => _data.ItemTypes; 2176public override ICollection<ProjectProperty> Properties => new ReadOnlyCollection<ProjectProperty>(_data.Properties); 2218public override ICollection<ProjectItem> Items => new ReadOnlyCollection<ProjectItem>(_data.Items); 2228public override ICollection<ProjectItem> ItemsIgnoringCondition 2319public override ICollection<ProjectProperty> AllEvaluatedProperties 2323ICollection<ProjectProperty> allEvaluatedProperties = _data.AllEvaluatedProperties; 2341public override ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata 2345ICollection<ProjectMetadata> allEvaluatedItemDefinitionMetadata = _data.AllEvaluatedItemDefinitionMetadata; 2365public override ICollection<ProjectItem> AllEvaluatedItems 2369ICollection<ProjectItem> allEvaluatedItems = _data.AllEvaluatedItems; 3106public override ICollection<ProjectItem> GetItems(string itemType) 3108ICollection<ProjectItem> items = _data.GetItems(itemType); 3120public override ICollection<ProjectItem> GetItemsIgnoringCondition(string itemType) 3122ICollection<ProjectItem> items = _data.ItemsIgnoringCondition[itemType]; 3137public override ICollection<ProjectItem> GetItemsByEvaluatedInclude(string evaluatedInclude) 3139ICollection<ProjectItem> items = _data.GetItemsByEvaluatedInclude(evaluatedInclude); 4178public ICollection<string> ItemTypes => Items.ItemTypes; 4547public ICollection<ProjectItem> GetItems(string itemType) 4605internal ICollection<ProjectItem> GetItemsByEvaluatedInclude(string evaluatedInclude) 4608ICollection<ProjectItem> items = new ReadOnlyCollection<ProjectItem>(ItemsByEvaluatedIncludeCache[evaluatedInclude]);
Definition\ProjectCollection.cs (6)
586public ICollection<Project> LoadedProjects => GetLoadedProjects(true, null); 608public ICollection<ILogger> Loggers 616? (ICollection<ILogger>)ReadOnlyEmptyCollection<ILogger>.Instance 628public ICollection<Toolset> Toolsets 1097public ICollection<Project> GetLoadedProjects(string fullPath) 1107internal ICollection<Project> GetLoadedProjects(bool includeExternal, string fullPath = null)
Definition\ProjectItem.cs (2)
288public ICollection<ProjectMetadata> Metadata 329internal ICollection<ProjectMetadata> MetadataCollection
Definition\Toolset.cs (1)
928ICollection<ProjectPropertyInstance> subToolsetProperties = null;
Evaluation\Expander.cs (1)
2012var itemsOfType = evaluatedItems.GetItems(expressionCapture.ItemType);
Evaluation\IItemProvider.cs (1)
23ICollection<T> GetItems(string itemType);
Evaluation\IToolsetProvider.cs (1)
18ICollection<Toolset> Toolsets
Evaluation\LazyItemEvaluator.cs (1)
628private static IEnumerable<string> GetExpandedMetadataValuesAndConditions(ICollection<ProjectMetadataElement> metadata, Expander<P, I> expander)
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
49public ICollection<I> GetItems(string itemType)
Evaluation\LazyItemEvaluator.OrderedItemDataCollection.cs (2)
137public void RemoveAll(ICollection<I> itemsToRemove) 147public void RemoveAll(ICollection<string> itemPathsToRemove)
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (1)
130public ICollection<I> GetItems(string itemType) => _wrapped.GetItems(itemType);
Evaluation\ToolsetProvider.cs (1)
62public ICollection<Toolset> Toolsets => _toolsets.Values;
Graph\GraphBuildRequestData.cs (14)
32public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild) 43public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices) 55public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 70public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices) 83public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 93public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild) 104public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices) 116public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 126public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild) 137public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices) 149public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 157public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions graphBuildOptions) 168private GraphBuildRequestData(ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions? graphBuildOptions = null) 245public new ICollection<string> TargetNames => base.TargetNames;
Graph\ProjectGraph.cs (2)
609public IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> GetTargetLists(ICollection<string> entryProjectTargets) 786void ThrowOnEmptyTargetNames(ICollection<string> targetNames)
Graph\ProjectInterpretation.cs (1)
497ICollection<ProjectItemInstance> projectReferenceTargets = project.GetItems(ItemTypeNames.ProjectReferenceTargets);
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (2)
43public ICollection<string> Keys => _projectElements.Keys; 45public ICollection<T> Values => _values;
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (2)
64public ICollection<string> Keys => _globalProperties.Keys; 66public ICollection<ProjectPropertyInstance> Values => _values;
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (12)
24private readonly IDictionary<string, ICollection<TCached>> _itemsByType; 25private readonly ICollection<TCached> _allCachedItems; 30ICollection<TCached> allItems, 31IDictionary<string, ICollection<TCached>> itemsByType, 47public ICollection<T> this[string itemType] 51if (!_itemsByType.TryGetValue(itemType, out ICollection<TCached>? list)) 64public ICollection<string> ItemTypes => _itemsByType.Keys; 92ICollection<T> items = GetItems(itemType); 151public ICollection<T> GetItems(string itemType) 153if (_itemsByType.TryGetValue(itemType, out ICollection<TCached>? items)) 182private readonly ICollection<TCached> _list; 185public ListConverter(string itemType, ICollection<TCached> list, Func<TCached, T?> getInstance)
Instance\ProjectInstance.cs (16)
923var itemsByType = linkedProject.Items as IDictionary<string, ICollection<ProjectItem>>; 1008ICollection<ProjectProperty> linkedProjectProperties = linkedProject.Properties; 1104public ICollection<string> ItemTypes 1119public ICollection<ProjectPropertyInstance> Properties 1125(ICollection<ProjectPropertyInstance>)ReadOnlyEmptyCollection<ProjectPropertyInstance>.Instance : 1134public ICollection<ProjectItemInstance> Items 1140(ICollection<ProjectItemInstance>)ReadOnlyEmptyCollection<ProjectItemInstance>.Instance : 1560internal ICollection<ProjectPropertyInstance> TestEnvironmentalProperties => new ReadOnlyCollection<ProjectPropertyInstance>(_environmentVariableProperties); 1676ICollection<ProjectItemInstance> IItemProvider<ProjectItemInstance>.GetItems(string itemType) 1987public ICollection<ProjectItemInstance> GetItems(string itemType) 2511ICollection<ProjectItemInstance> itemList = _items[itemType]; 2699parameters.Loggers = (loggers is ICollection<ILogger> loggersCollection) ? loggersCollection : new List<ILogger>(loggers); 2712parameters.ForwardingLoggers = remoteLoggers is ICollection<ForwardingLoggerRecord> records ? 3289private void CreateEvaluatedIncludeSnapshotIfRequested(bool keepEvaluationCache, ICollection<ProjectItem> items, Dictionary<ProjectItem, ProjectItemInstance> projectItemToInstanceMap) 3308private Dictionary<ProjectItem, ProjectItemInstance> CreateItemsSnapshot(ICollection<ProjectItem> items, int itemTypeCount, bool keepEvaluationCache) 3445private void CreatePropertiesSnapshot(ICollection<ProjectProperty> properties, bool isImmutable)
Instance\ProjectItemDefinitionInstance.cs (1)
101public ICollection<ProjectMetadataInstance> Metadata
Instance\ProjectItemGroupTaskInstance.cs (2)
91public ICollection<ProjectItemGroupTaskItemInstance> Items 97(ICollection<ProjectItemGroupTaskItemInstance>)ReadOnlyEmptyCollection<ProjectItemGroupTaskItemInstance>.Instance :
Instance\ProjectItemGroupTaskItemInstance.cs (2)
322public ICollection<ProjectItemGroupTaskMetadataInstance> Metadata 328(ICollection<ProjectItemGroupTaskMetadataInstance>)ReadOnlyEmptyCollection<ProjectItemGroupTaskMetadataInstance>.Instance :
Instance\ProjectItemInstance.cs (1)
283public ICollection<string> MetadataNames
Instance\ProjectPropertyGroupTaskInstance.cs (2)
91public ICollection<ProjectPropertyGroupTaskPropertyInstance> Properties 97(ICollection<ProjectPropertyGroupTaskPropertyInstance>)ReadOnlyEmptyCollection<ProjectPropertyGroupTaskPropertyInstance>.Instance :
Instance\ProjectTargetInstance.cs (1)
331public ICollection<ProjectTaskInstance> Tasks
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
886else if (items is ICollection<ITaskItem> genericList)
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemDefinitionLink.cs (1)
30public abstract ICollection<ProjectMetadata> Metadata { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemLink.cs (2)
36public abstract ICollection<ProjectMetadata> MetadataCollection { get; } 41public abstract ICollection<ProjectMetadata> DirectMetadata { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (10)
46public abstract ICollection<string> ItemTypes { get; } 51public abstract ICollection<ProjectProperty> Properties { get; } 66public abstract ICollection<ProjectItem> Items { get; } 71public abstract ICollection<ProjectItem> ItemsIgnoringCondition { get; } 91public abstract ICollection<ProjectProperty> AllEvaluatedProperties { get; } 96public abstract ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata { get; } 101public abstract ICollection<ProjectItem> AllEvaluatedItems { get; } 196public abstract ICollection<ProjectItem> GetItems(string itemType); 201public abstract ICollection<ProjectItem> GetItemsIgnoringCondition(string itemType); 206public abstract ICollection<ProjectItem> GetItemsByEvaluatedInclude(string evaluatedInclude);
ObjectModelRemoting\ExternalProjectsProvider.cs (1)
21public abstract ICollection<Project> GetLoadedProjects(string filePath);
ReadOnlyCollection.cs (6)
81private ICollection<T> BackingCollection 85ICollection<T> backingCollection = _backing as ICollection<T>; 119if (!(_backing is ICollection<T>)) 134ICollection<T> backingCollection = _backing as ICollection<T>;
ReadOnlyEmptyDictionary.cs (2)
73public ICollection<K> Keys => 83public ICollection<V> Values =>
SolutionConfiguration.cs (1)
108public ICollection<XmlElement> ProjectConfigurations => _cachedProjectElements.Values;
TaskHostConfiguration.cs (9)
95private ICollection<string> _warningsAsErrors; 96private ICollection<string> _warningsNotAsErrors; 98private ICollection<string> _warningsAsMessages; 162ICollection<string> warningsAsErrors, 163ICollection<string> warningsNotAsErrors, 164ICollection<string> warningsAsMessages) 381public ICollection<string> WarningsAsErrors 390public ICollection<string> WarningsNotAsErrors 399public ICollection<string> WarningsAsMessages
WindowsFileSystem.cs (1)
122ICollection<string> result)
Microsoft.Build.Engine.OM.UnitTests (61)
Construction\ElementLocationPublic_Tests.cs (1)
131var values = new List<KeyValuePair<string, ElementLocation>>((ICollection<KeyValuePair<string, ElementLocation>>)property.GetValue(element, null));
Definition\ProjectItem_Tests.cs (6)
2218var items = project.GetItems("I"); 2232var metadata = item.Metadata; 2245var metadataElements = items.First().Xml.Metadata; 2278var items = project.GetItems("I"); 2292var metadata = item.Metadata; 2301var metadataElements = items.First().Xml.Metadata;
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (8)
129public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<CT, bool> matcher, int expectedCount) 132var result = QueryChildrenWithValidation(matcher); 137public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<T, IEnumerable> getter, Func<CT, bool> matcher, int expectedCount) 140var result = QueryChildrenWithValidation(getter, matcher); 145public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<T, IEnumerable> getter, Func<CT, bool> matcher) 184public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<CT, bool> matcher) 196var result = QueryChildrenWithValidation(matcher, 1); 203var result = QueryChildrenWithValidation(getter, matcher, 1);
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (3)
27private ProjectItem VerifyAfterAddSingleItem(ObjectType where, ICollection<ProjectItem> added, IEnumerable<KeyValuePair<string, string>> metadata) 68var realItems = this.Real.GetItemsByEvaluatedInclude(evaluatedInclude); 69var viewItems = this.View.GetItemsByEvaluatedInclude(evaluatedInclude);
ObjectModelRemoting\LinkedEvaluationReadOnly_Tests.cs (6)
68var viewItems = this.StdGroup.View.AllEvaluatedItems; 69var realItems = this.StdGroup.Real.AllEvaluatedItems; 88var viewProperties = this.StdGroup.View.Properties; 89var realProperties = this.StdGroup.Real.Properties; 98var viewMetadata = this.StdGroup.View.AllEvaluatedItemDefinitionMetadata; 99var realMetadata = this.StdGroup.Real.AllEvaluatedItemDefinitionMetadata;
ObjectModelRemoting\LinkedProjectCollection_Tests.cs (10)
41var loadedLocal = pcLocal.Collection.LoadedProjects; 42var loadedRemote = pcRemote.Collection.LoadedProjects; 84var loadedLocal = pcLocal.Collection.LoadedProjects; 85var loadedRemote0 = pcRemote0.Collection.LoadedProjects; 86var loadedRemote1 = pcRemote1.Collection.LoadedProjects; 94var loadedWithExternal = pcLocal.Collection.LoadedProjects; 97var prj0Coll = pcLocal.Collection.GetLoadedProjects(proj0Path); 101var prj1Coll = pcLocal.Collection.GetLoadedProjects(proj1Path); 106var prj2Coll = pcLocal.Collection.GetLoadedProjects(proj2Path); 115var prj3Coll = pcLocal.Collection.GetLoadedProjects(proj3Path);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemDefinitionLink.cs (2)
23public ICollection<MockProjectMetadataLinkRemoter> Metadata => this.OwningCollection.ExportCollection<ProjectMetadata, MockProjectMetadataLinkRemoter>(this.Source.Metadata); 47public override ICollection<ProjectMetadata> Metadata
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemLink.cs (4)
25public ICollection<MockProjectMetadataLinkRemoter> MetadataCollection => this.OwningCollection.ExportCollection<ProjectMetadata, MockProjectMetadataLinkRemoter>(this.Source.Metadata); 26public ICollection<MockProjectMetadataLinkRemoter> DirectMetadata => this.OwningCollection.ExportCollection<ProjectMetadata, MockProjectMetadataLinkRemoter>(this.Source.DirectMetadata); 56public override ICollection<ProjectMetadata> MetadataCollection 58public override ICollection<ProjectMetadata> DirectMetadata
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (19)
38public ICollection<string> ItemTypes => this.Source.ItemTypes; 40public ICollection<MockProjectPropertyLinkRemoter> Properties 48public ICollection<MockProjectItemLinkRemoter> Items => this.OwningCollection.ExportCollection<ProjectItem, MockProjectItemLinkRemoter>(this.Source.Items); 50public ICollection<MockProjectItemLinkRemoter> ItemsIgnoringCondition => this.OwningCollection.ExportCollection<ProjectItem, MockProjectItemLinkRemoter>(this.Source.ItemsIgnoringCondition); 57public ICollection<MockProjectPropertyLinkRemoter> AllEvaluatedProperties 64public ICollection<MockProjectItemLinkRemoter> AllEvaluatedItems => this.OwningCollection.ExportCollection<ProjectItem, MockProjectItemLinkRemoter>(this.Source.AllEvaluatedItems); 79public ICollection<MockProjectItemLinkRemoter> GetItems(string itemType) 82public ICollection<MockProjectItemLinkRemoter> GetItemsByEvaluatedInclude(string evaluatedInclude) 85public ICollection<MockProjectItemLinkRemoter> GetItemsIgnoringCondition(string itemType) 139public override ICollection<string> ItemTypes => this.Proxy.ItemTypes; 141public override ICollection<ProjectProperty> Properties => this.Linker.ImportCollection<ProjectProperty, MockProjectPropertyLinkRemoter>(this.Proxy.Properties); 148public override ICollection<ProjectItem> Items => this.Linker.ImportCollection<ProjectItem, MockProjectItemLinkRemoter>(this.Proxy.Items); 150public override ICollection<ProjectItem> ItemsIgnoringCondition => this.Linker.ImportCollection<ProjectItem, MockProjectItemLinkRemoter>(this.Proxy.ItemsIgnoringCondition); 158public override ICollection<ProjectProperty> AllEvaluatedProperties 160public override ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata 163public override ICollection<ProjectItem> AllEvaluatedItems 217public override ICollection<ProjectItem> GetItems(string itemType) 219public override ICollection<ProjectItem> GetItemsByEvaluatedInclude(string evaluatedInclude) 222public override ICollection<ProjectItem> GetItemsIgnoringCondition(string itemType)
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
344public override ICollection<Project> GetLoadedProjects(string filePath)
WindowsFileSystem.cs (1)
122ICollection<string> result)
Microsoft.Build.Engine.UnitTests (113)
BackEnd\IntrinsicTask_Tests.cs (48)
250ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 251ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 293var group = lookup.GetItems("i1"); 313var group = lookup.GetItems("i1"); 334var group = lookup.GetItems("i1"); 354var group = lookup.GetItems("i1"); 375var group = lookup.GetItems("i1"); 396var group = lookup.GetItems("i1"); 424var group = lookup.GetItems("i1"); 446var group = lookup.GetItems("i2"); 470var group = lookup.GetItems("i2"); 497var group = lookup.GetItems("i2"); 523var group = lookup.GetItems("i2"); 552var group = lookup.GetItems("i2"); 576var group = lookup.GetItems("i2"); 600var group = lookup.GetItems("i2"); 626var group = lookup.GetItems("i2"); 655var group = lookup.GetItems("i2"); 702ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 725ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 751ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 822ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 823ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 846ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 867ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 868ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 891ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 892ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1002ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1003ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1029ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1030ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1063ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1120ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1121ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1777var items = lookup.GetItems("I2"); 1811var items = lookup.GetItems("I2"); 1853var items = lookup.GetItems("I2"); 1908var items = lookup.GetItems("I2"); 1942var items = lookup.GetItems("I2"); 1980var items = lookup.GetItems("I2"); 2016var items = lookup.GetItems("I2"); 2053ICollection<ProjectItemInstance> items = lookup.GetItems("I2"); 2088ICollection<ProjectItemInstance> items = lookup.GetItems("I3"); 2147ICollection<ProjectItemInstance> i0Group = lookup.GetItems("i0"); 2228ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 2271ICollection<ProjectItemInstance> linkGroup = lookup.GetItems("link"); 3115ICollection<ProjectItemInstance> i0Group = lookup.GetItems("i0");
BackEnd\Lookup_Tests.cs (26)
172var group = lookup.GetItems("i1"); 224var group = lookup.GetItems("i1"); 416ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 481ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 541ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 612ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 679ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 733ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 781ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 836ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 876ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 911ICollection<ProjectItemInstance> group = lookup.GetItems("i1"); 926ICollection<ProjectItemInstance> foundGroup = lookup.GetItems("i1"); 982ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1039ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1044ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1051ICollection<ProjectItemInstance> group3 = new List<ProjectItemInstance>(); 1056ICollection<ProjectItemInstance> group4 = lookup.GetItems(item1b.ItemType); 1064ICollection<ProjectItemInstance> group5 = lookup.GetItems(item1b.ItemType); 1095ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1107ICollection<ProjectItemInstance> group4 = lookup.GetItems(item1b.ItemType); 1115ICollection<ProjectItemInstance> group5 = lookup.GetItems(item1b.ItemType); 1148ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1156ICollection<ProjectItemInstance> group3 = lookup.GetItems(item1.ItemType); 1185ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1193ICollection<ProjectItemInstance> group3 = lookup.GetItems(item1.ItemType);
BackEnd\MockLoggingService.cs (8)
59public ICollection<ILogger> Loggers 123public ICollection<LoggerDescription> LoggerDescriptions 134public ICollection<string> RegisteredLoggerTypeNames 145public ICollection<string> RegisteredSinkNames 306public void InitializeNodeLoggers(ICollection<LoggerDescription> loggerDescriptions, IBuildEventSink forwardingLoggerSink, int nodeId) 667public ICollection<string> GetWarningsAsErrors(BuildEventContext context) 672public ICollection<string> GetWarningsNotAsErrors(BuildEventContext context) 677public ICollection<string> GetWarningsAsMessages(BuildEventContext context)
BackEnd\TargetEntry_Tests.cs (13)
172ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 214ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 259ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 326ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 359ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 466ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 493ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 511ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 532ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 553ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 574ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 595ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry)); 616ICollection<TargetSpecification> deps = entry.GetDependencies(GetProjectLoggingContext(entry.RequestEntry));
BackEnd\TranslationHelpers.cs (2)
55internal static bool CompareCollections<T>(ICollection<T> left, ICollection<T> right, IComparer<T> comparer)
Collections\OMcollections_tests.cs (1)
133ICollection<ProjectItemInstance> itemList = items["x"];
Definition\Project_Internal_Tests.cs (1)
258var c = project.ItemsIgnoringCondition;
Definition\ProjectEvaluationContext_Tests.cs (3)
524var actualGlobExpansion = project.GetItems("i"); 595var actualGlobExpansion = project.GetItems("i"); 655var actualGlobExpansion = project.GetItems("i");
Evaluation\Expander_Tests.cs (5)
4799ICollection<ProjectItemInstance> myDirectories = projectInstance.GetItems("MyDirectories"); 4843ICollection<ProjectItemInstance> myDirectories = projectInstance.GetItems("MyDirectories"); 4872ICollection<ProjectItemInstance> squiggles = projectInstance.GetItems("Squiggle"); 4919ICollection<ProjectItemInstance> squiggleItems = projectInstance.GetItems("Compile"); 4960ICollection<ProjectItemInstance> squiggleItems = projectInstance.GetItems("MyDirectory");
Evaluation\SdkResultEvaluation_Tests.cs (5)
81var itemsFromResolver = project.GetItems("ItemNameFromSdkResolver"); 223var items = project.GetItems("ItemsFromSdkResolverAfter"); 323var items = project.GetItems("ItemsFromSdkResolverAfter"); 402var itemsFromBody = project.GetItems("ItemsFromSdkResolverInProjectBody"); 454var itemsFromResolver = project.GetItems("ItemName");
WarningsAsMessagesAndErrors_Tests.cs (1)
257private string GetTestProject(bool? treatAllWarningsAsErrors = null, string warningsAsErrors = null, string warningsAsMessages = null, ICollection<KeyValuePair<string, string>> customProperties = null)
Microsoft.Build.Framework (82)
BinaryTranslator.cs (4)
370public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T> 1106public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T>
BuildCheck\EnumerableExtensions.cs (1)
50public static HashSet<T>? ToHashSet<T>(this ICollection<T>? source, IEqualityComparer<T>? equalityComparer = null)
ICollectionCalls`1.cs (2)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T>
ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
ImmutableSegmentedDictionary`2.cs (9)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 168ICollection<KeyValuePair<TKey, TValue>> collectionToCheck = dictionary ?? self._dictionary; 348void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 349=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 363void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 366void ICollection<KeyValuePair<TKey, TValue>>.Clear() 369bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
ImmutableSegmentedDictionary`2+Builder.cs (5)
66ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 68ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 70bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 222void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 223=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
ImmutableSegmentedList`1+ValueBuilder.cs (1)
37bool ICollection<T>.IsReadOnly => false;
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)
SegmentedArray`1.cs (8)
127int ICollection<T>.Count => Length; 164void ICollection<T>.CopyTo(T[] array, int arrayIndex) 168ICollection<T> collection = _items[i]; 197void ICollection<T>.Add(T value) 212void ICollection<T>.Clear() 229bool ICollection<T>.Contains(T value) 231foreach (ICollection<T> collection in _items) 285bool ICollection<T>.Remove(T value)
SegmentedDictionary`2.cs (18)
144: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 169ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 175ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 205void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 208bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 219bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 840bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 842void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1303bool ICollection<TKey>.IsReadOnly => true; 1305void ICollection<TKey>.Add(TKey item) 1308void ICollection<TKey>.Clear() 1311bool ICollection<TKey>.Contains(TKey item) 1314bool ICollection<TKey>.Remove(TKey item) 1503bool ICollection<TValue>.IsReadOnly => true; 1505void ICollection<TValue>.Add(TValue item) 1508bool ICollection<TValue>.Remove(TValue item) 1514void ICollection<TValue>.Clear() 1517bool ICollection<TValue>.Contains(TValue item)
SegmentedList`1.cs (3)
83if (collection is ICollection<T> c) 157bool ICollection<T>.IsReadOnly => false; 753if (collection is ICollection<T> c)
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.Build.Tasks.Core (20)
AssemblyDependency\Reference.cs (1)
189internal ICollection<ITaskItem> GetSourceItems()
AssemblyDependency\ReferenceTable.cs (3)
1413ICollection<ITaskItem> dependees = assemblyReference.GetSourceItems(); 1486ICollection<ITaskItem> dependees = assemblyReference.GetSourceItems(); 2700ICollection<ITaskItem> sourceItems = reference.GetSourceItems();
AssemblyDependency\ResolveAssemblyReference.cs (1)
1868ICollection<ITaskItem> dependees = reference.GetSourceItems();
CopyOnWriteDictionary.cs (2)
114public ICollection<string> Keys => ((IDictionary<string, V>)_backing).Keys; 119public ICollection<V> Values => ((IDictionary<string, V>)_backing).Values;
ReadOnlyCollection.cs (6)
81private ICollection<T> BackingCollection 85ICollection<T> backingCollection = _backing as ICollection<T>; 119if (!(_backing is ICollection<T>)) 134ICollection<T> backingCollection = _backing as ICollection<T>;
ReadOnlyEmptyDictionary.cs (2)
73public ICollection<K> Keys => 83public ICollection<V> Values =>
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
205internal static string GetSourceCode(RoslynCodeTaskFactoryTaskInfo taskInfo, ICollection<TaskPropertyInfo> parameters) 276/// <param name="parameters">An <see cref="ICollection{TaskPropertyInfo}"/> containing parameters for the task.</param> 293internal static bool TryLoadTaskBody(TaskLoggingHelper log, string taskName, string taskBody, ICollection<TaskPropertyInfo> parameters, out RoslynCodeTaskFactoryTaskInfo taskInfo)
SolutionConfiguration.cs (1)
108public ICollection<XmlElement> ProjectConfigurations => _cachedProjectElements.Values;
WindowsFileSystem.cs (1)
122ICollection<string> result)
Microsoft.Build.Tasks.UnitTests (3)
RoslynCodeTaskFactory_Tests.cs (3)
233ICollection<TaskPropertyInfo> parameters = new List<TaskPropertyInfo> 342ICollection<TaskPropertyInfo> parameters = new List<TaskPropertyInfo> 792ICollection<TaskPropertyInfo> parameters = null,
Microsoft.Build.UnitTests.Shared (3)
ObjectModelHelpers.cs (3)
248public static void AssertItems(string[] expectedItems, ICollection<ProjectItem> items, Dictionary<string, string> expectedDirectMetadata = null, bool normalizeSlashes = false) 1256public static void AssertCollectionsValueEqual<T>(ICollection<T> one, ICollection<T> two)
Microsoft.Build.Utilities.Core (10)
ApiContract.cs (1)
46internal static void ReadContractsElement(XmlElement element, ICollection<ApiContract> apiContracts)
CopyOnWriteDictionary.cs (2)
114public ICollection<string> Keys => ((IDictionary<string, V>)_backing).Keys; 119public ICollection<V> Values => ((IDictionary<string, V>)_backing).Values;
ExtensionSDK.cs (1)
139public ICollection<ApiContract> ApiContracts => Manifest.ApiContracts;
PlatformManifest.cs (2)
56public ICollection<DependentPlatform> DependentPlatforms { get; private set; } 63public ICollection<ApiContract> ApiContracts { get; private set; }
ReadOnlyEmptyDictionary.cs (2)
73public ICollection<K> Keys => 83public ICollection<V> Values =>
SDKManifest.cs (1)
241internal ICollection<ApiContract> ApiContracts { get; private set; }
WindowsFileSystem.cs (1)
122ICollection<string> result)
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 (141)
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)
27private readonly ImmutableArray<ICollection<T>> _collections; 30public static ICollection<T> Create(ICollection<T> coll1, ICollection<T> coll2) 48public static ICollection<T> Create<TOrig>(ImmutableArray<TOrig> collections, Func<TOrig, ICollection<T>> selector) 65private UnionCollection(ImmutableArray<ICollection<T>> collections) 85foreach (var c in _collections) 99foreach (var collection in _collections)
Compilation\Compilation.cs (2)
3049ICollection<MethodDefinitionHandle> updatedMethods, 3070ICollection<MethodDefinitionHandle> updatedMethods,
InternalUtilities\ConcurrentSet.cs (1)
171void ICollection<T>.Add(T item)
InternalUtilities\EnumerableExtensions.cs (5)
93if (items is ICollection<T> collection && collection.Count == 0) 284if (source is ICollection<T> genericCollection) 312public static bool IsEmpty<T>(this ICollection<T> source) 323/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 331/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
InternalUtilities\SpecializedCollections.cs (5)
21public static ICollection<T> EmptyCollection<T>() 68public static ICollection<T> SingletonCollection<T>(T value) 93public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 97: new ReadOnly.Collection<ICollection<T>, T>(collection);
InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
16public static readonly ICollection<T> Instance = new Collection<T>();
InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (2)
39public ICollection<TKey> Keys 61public ICollection<TValue> Values
InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
15where TUnderlying : ICollection<T>
SpecialType.cs (1)
161/// Indicates that the type is <see cref="ICollection{T}"/>.
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 357void ICollection<KeyValuePair<TKey, TValue>>.Clear() 360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (4)
43ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 45ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
64readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 66readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (5)
87bool ICollection<T>.IsReadOnly => true; 344void ICollection<T>.CopyTo(T[] array, int arrayIndex) 383void ICollection<T>.Add(T item) 386void ICollection<T>.Clear() 389bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+Builder.cs (3)
34bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 115void ICollection<T>.Add(T item) 118void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
58readonly bool ICollection<T>.IsReadOnly => false; 269void ICollection<T>.Add(T item) 270=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 272readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 273=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
37readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T> 25where TCollection : ICollection<T> 29where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\SegmentedArray`1.cs (8)
124int ICollection<T>.Count => Length; 161void ICollection<T>.CopyTo(T[] array, int arrayIndex) 165ICollection<T> collection = _items[i]; 194void ICollection<T>.Add(T value) 209void ICollection<T>.Clear() 226bool ICollection<T>.Contains(T value) 228foreach (ICollection<T> collection in _items) 282bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1339bool ICollection<TKey>.IsReadOnly => true; 1341void ICollection<TKey>.Add(TKey item) 1344void ICollection<TKey>.Clear() 1350bool ICollection<TKey>.Remove(TKey item) 1547bool ICollection<TValue>.IsReadOnly => true; 1549void ICollection<TValue>.Add(TValue item) 1552bool ICollection<TValue>.Remove(TValue item) 1558void ICollection<TValue>.Clear() 1561bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\SegmentedHashSet`1.cs (8)
118if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 358bool ICollection<T>.IsReadOnly => false; 444if (other is ICollection<T> otherAsCollection) 583if (other is ICollection<T> otherAsCollection) 632if (other is ICollection<T> otherAsCollection) 676if (other is ICollection<T> otherAsCollection) 769other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\SegmentedList`1.cs (4)
85if (collection is ICollection<T> c) 184bool ICollection<T>.IsReadOnly => false; 302if (collection is ICollection<T> c) 902if (collection is ICollection<T> c)
Symbols\IAssemblySymbol.cs (2)
46ICollection<string> TypeNames { get; } 51ICollection<string> NamespaceNames { get; }
Syntax\SyntaxList`1.cs (2)
86var collection = nodes as ICollection<TNode>;
Syntax\SyntaxTriviaList.cs (2)
330var triviaCollection = trivia as ICollection<SyntaxTrivia>;
Microsoft.CodeAnalysis.CodeStyle (131)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
37protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation operation); 122var 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\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
93if (items is ICollection<T> collection && collection.Count == 0) 284if (source is ICollection<T> genericCollection) 312public static bool IsEmpty<T>(this ICollection<T> source) 323/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 331/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.cs (5)
21public static ICollection<T> EmptyCollection<T>() 68public static ICollection<T> SingletonCollection<T>(T value) 93public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 97: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
16public static readonly ICollection<T> Instance = new Collection<T>();
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (2)
39public ICollection<TKey> Keys 61public ICollection<TValue> Values
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
15where TUnderlying : ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 357void ICollection<KeyValuePair<TKey, TValue>>.Clear() 360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (4)
43ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 45ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
64readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 66readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (5)
87bool ICollection<T>.IsReadOnly => true; 344void ICollection<T>.CopyTo(T[] array, int arrayIndex) 383void ICollection<T>.Add(T item) 386void ICollection<T>.Clear() 389bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+Builder.cs (3)
34bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 115void ICollection<T>.Add(T item) 118void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
58readonly bool ICollection<T>.IsReadOnly => false; 269void ICollection<T>.Add(T item) 270=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 272readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 273=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
37readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T> 25where TCollection : ICollection<T> 29where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\SegmentedArray`1.cs (8)
124int ICollection<T>.Count => Length; 161void ICollection<T>.CopyTo(T[] array, int arrayIndex) 165ICollection<T> collection = _items[i]; 194void ICollection<T>.Add(T value) 209void ICollection<T>.Clear() 226bool ICollection<T>.Contains(T value) 228foreach (ICollection<T> collection in _items) 282bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1339bool ICollection<TKey>.IsReadOnly => true; 1341void ICollection<TKey>.Add(TKey item) 1344void ICollection<TKey>.Clear() 1350bool ICollection<TKey>.Remove(TKey item) 1547bool ICollection<TValue>.IsReadOnly => true; 1549void ICollection<TValue>.Add(TValue item) 1552bool ICollection<TValue>.Remove(TValue item) 1558void ICollection<TValue>.Clear() 1561bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\SegmentedHashSet`1.cs (8)
118if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 358bool ICollection<T>.IsReadOnly => false; 444if (other is ICollection<T> otherAsCollection) 583if (other is ICollection<T> otherAsCollection) 632if (other is ICollection<T> otherAsCollection) 676if (other is ICollection<T> otherAsCollection) 769other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\SegmentedList`1.cs (4)
85if (collection is ICollection<T> c) 184bool ICollection<T>.IsReadOnly => false; 302if (collection is ICollection<T> c) 902if (collection is ICollection<T> c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IAssemblySymbolExtensions.cs (1)
49var typeNames = a.TypeNames;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICollectionExtensions.cs (3)
27public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 43public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 49public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ICollectionExtensions.cs (5)
14public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 30public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 42public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 54public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 66public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
40protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation switchOperation);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
46protected 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 (99)
ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 357void ICollection<KeyValuePair<TKey, TValue>>.Clear() 360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
ImmutableSegmentedDictionary`2+Builder.cs (4)
43ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 45ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
64readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 66readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
ImmutableSegmentedHashSet`1.cs (5)
87bool ICollection<T>.IsReadOnly => true; 344void ICollection<T>.CopyTo(T[] array, int arrayIndex) 383void ICollection<T>.Add(T item) 386void ICollection<T>.Clear() 389bool ICollection<T>.Remove(T item)
ImmutableSegmentedHashSet`1+Builder.cs (3)
34bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 115void ICollection<T>.Add(T item) 118void ICollection<T>.CopyTo(T[] array, int arrayIndex)
ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
58readonly bool ICollection<T>.IsReadOnly => false; 269void ICollection<T>.Add(T item) 270=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 272readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 273=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
ImmutableSegmentedList`1+ValueBuilder.cs (1)
37readonly bool ICollection<T>.IsReadOnly => false;
Internal\ICollectionCalls`1.cs (4)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T> 25where TCollection : ICollection<T> 29where TCollection : ICollection<T>
Internal\ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
Internal\IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
SegmentedArray`1.cs (8)
124int ICollection<T>.Count => Length; 161void ICollection<T>.CopyTo(T[] array, int arrayIndex) 165ICollection<T> collection = _items[i]; 194void ICollection<T>.Add(T value) 209void ICollection<T>.Clear() 226bool ICollection<T>.Contains(T value) 228foreach (ICollection<T> collection in _items) 282bool ICollection<T>.Remove(T value)
SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1339bool ICollection<TKey>.IsReadOnly => true; 1341void ICollection<TKey>.Add(TKey item) 1344void ICollection<TKey>.Clear() 1350bool ICollection<TKey>.Remove(TKey item) 1547bool ICollection<TValue>.IsReadOnly => true; 1549void ICollection<TValue>.Add(TValue item) 1552bool ICollection<TValue>.Remove(TValue item) 1558void ICollection<TValue>.Clear() 1561bool ICollection<TValue>.Contains(TValue item)
SegmentedHashSet`1.cs (8)
118if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 358bool ICollection<T>.IsReadOnly => false; 444if (other is ICollection<T> otherAsCollection) 583if (other is ICollection<T> otherAsCollection) 632if (other is ICollection<T> otherAsCollection) 676if (other is ICollection<T> otherAsCollection) 769other is ICollection<T> otherAsCollection &&
SegmentedList`1.cs (4)
85if (collection is ICollection<T> c) 184bool ICollection<T>.IsReadOnly => false; 302if (collection is ICollection<T> c) 902if (collection is ICollection<T> c)
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)
40private ICollection<string>? _typeNames; 41private ICollection<string>? _namespaceNames; 42private ICollection<ReferenceDirective>? _referenceDirectives; 158private ICollection<string> GetMergedTypeNames() 172private ICollection<string> GetMergedNamespaceNames() 186private ICollection<ReferenceDirective> GetMergedReferenceDirectives() 241public ICollection<string> TypeNames 252public ICollection<string> NamespaceNames
Declarations\MergedTypeDeclaration.cs (3)
25private ICollection<string> _lazyMemberNames; 240public ICollection<string> MemberNames 246var 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)
225internal 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)
44private ICollection<string> _lazyMemberNames; 872private static ICollection<string> CreateReadOnlyMemberNames(HashSet<string> names) 1501var 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)
152public override ICollection<string> TypeNames 160public override ICollection<string> NamespaceNames
Symbols\MissingModuleSymbol.cs (2)
130internal override ICollection<string> NamespaceNames 138internal 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)
466internal override ICollection<string> TypeNames 474internal 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)
53nameof(ICollection<int>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
53nameof(ICollection<int>),
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)
1089public override void TryAddPossibleNameConflicts(ISymbol symbol, string replacementText, ICollection<string> possibleNameConflicts)
Microsoft.CodeAnalysis.EditorFeatures (1)
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.Features (10)
EditAndContinue\EmitSolutionUpdateResults.cs (1)
234bool AddImpactedRunningProjects(ICollection<ProjectId> impactedProjects, Project initialProject)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
37protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation operation); 122var 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)
40protected abstract ICollection<ISymbol> GetMissingEnumMembers(TSwitchOperation switchOperation);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
46protected 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.LanguageServer (2)
Testing\TestRunner.TestRunHandler.cs (2)
43public void HandleTestRunComplete(TestRunCompleteEventArgs testRunCompleteArgs, TestRunChangedEventArgs? lastChunkArgs, ICollection<AttachmentSet>? runContextAttachments, ICollection<string>? executorUris)
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)
39Assert.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\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
93if (items is ICollection<T> collection && collection.Count == 0) 284if (source is ICollection<T> genericCollection) 312public static bool IsEmpty<T>(this ICollection<T> source) 323/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 331/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.cs (5)
21public static ICollection<T> EmptyCollection<T>() 68public static ICollection<T> SingletonCollection<T>(T value) 93public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 97: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
16public static readonly ICollection<T> Instance = new Collection<T>();
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (2)
39public ICollection<TKey> Keys 61public ICollection<TValue> Values
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
15where TUnderlying : ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 357void ICollection<KeyValuePair<TKey, TValue>>.Clear() 360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (4)
43ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 45ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
64readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 66readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (5)
87bool ICollection<T>.IsReadOnly => true; 344void ICollection<T>.CopyTo(T[] array, int arrayIndex) 383void ICollection<T>.Add(T item) 386void ICollection<T>.Clear() 389bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+Builder.cs (3)
34bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 115void ICollection<T>.Add(T item) 118void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
58readonly bool ICollection<T>.IsReadOnly => false; 269void ICollection<T>.Add(T item) 270=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 272readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 273=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
37readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T> 25where TCollection : ICollection<T> 29where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\SegmentedArray`1.cs (8)
124int ICollection<T>.Count => Length; 161void ICollection<T>.CopyTo(T[] array, int arrayIndex) 165ICollection<T> collection = _items[i]; 194void ICollection<T>.Add(T value) 209void ICollection<T>.Clear() 226bool ICollection<T>.Contains(T value) 228foreach (ICollection<T> collection in _items) 282bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1339bool ICollection<TKey>.IsReadOnly => true; 1341void ICollection<TKey>.Add(TKey item) 1344void ICollection<TKey>.Clear() 1350bool ICollection<TKey>.Remove(TKey item) 1547bool ICollection<TValue>.IsReadOnly => true; 1549void ICollection<TValue>.Add(TValue item) 1552bool ICollection<TValue>.Remove(TValue item) 1558void ICollection<TValue>.Clear() 1561bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\SegmentedHashSet`1.cs (8)
118if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 358bool ICollection<T>.IsReadOnly => false; 444if (other is ICollection<T> otherAsCollection) 583if (other is ICollection<T> otherAsCollection) 632if (other is ICollection<T> otherAsCollection) 676if (other is ICollection<T> otherAsCollection) 769other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\SegmentedList`1.cs (4)
85if (collection is ICollection<T> c) 184bool ICollection<T>.IsReadOnly => false; 302if (collection is ICollection<T> c) 902if (collection is ICollection<T> c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IAssemblySymbolExtensions.cs (1)
49var typeNames = a.TypeNames;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICollectionExtensions.cs (3)
27public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items) 43public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct 49public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ICollectionExtensions.cs (5)
14public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values) 30public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values) 42public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values) 54public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull 66public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
65where TCollection : ICollection<TValue>, new() 145where TCollection : ICollection<TValue>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (120)
Build\ProjectBuildManager.cs (1)
88var 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\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (5)
93if (items is ICollection<T> collection && collection.Count == 0) 284if (source is ICollection<T> genericCollection) 312public static bool IsEmpty<T>(this ICollection<T> source) 323/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>. 331/// This method is necessary to avoid an ambiguity between <see cref="IsEmpty{T}(IReadOnlyCollection{T})"/> and <see cref="IsEmpty{T}(ICollection{T})"/>.
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.cs (5)
21public static ICollection<T> EmptyCollection<T>() 68public static ICollection<T> SingletonCollection<T>(T value) 93public static ICollection<T> ReadOnlyCollection<T>(ICollection<T>? collection) 97: new ReadOnly.Collection<ICollection<T>, T>(collection);
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Collection.cs (1)
16public static readonly ICollection<T> Instance = new Collection<T>();
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (2)
39public ICollection<TKey> Keys 61public ICollection<TValue> Values
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.ReadOnly.Collection.cs (1)
15where TUnderlying : ICollection<T>
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 357void ICollection<KeyValuePair<TKey, TValue>>.Clear() 360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (4)
43ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 45ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (2)
28bool ICollection<TKey>.IsReadOnly => false; 34void ICollection<TKey>.Add(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
28bool ICollection<TValue>.IsReadOnly => false; 34void ICollection<TValue>.Add(TValue item) 49bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (5)
24bool ICollection<TKey>.IsReadOnly => true; 42void ICollection<TKey>.CopyTo(TKey[] array, int arrayIndex) 48void ICollection<TKey>.Add(TKey item) 51void ICollection<TKey>.Clear() 54bool ICollection<TKey>.Remove(TKey item)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (5)
64readonly ICollection<TKey> IDictionary<TKey, TValue>.Keys => throw new NotSupportedException(); 66readonly ICollection<TValue> IDictionary<TKey, TValue>.Values => throw new NotSupportedException(); 68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (5)
24bool ICollection<TValue>.IsReadOnly => true; 42void ICollection<TValue>.CopyTo(TValue[] array, int arrayIndex) 48void ICollection<TValue>.Add(TValue item) 51void ICollection<TValue>.Clear() 54bool ICollection<TValue>.Remove(TValue item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (5)
87bool ICollection<T>.IsReadOnly => true; 344void ICollection<T>.CopyTo(T[] array, int arrayIndex) 383void ICollection<T>.Add(T item) 386void ICollection<T>.Clear() 389bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+Builder.cs (3)
34bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder); 115void ICollection<T>.Add(T item) 118void ICollection<T>.CopyTo(T[] array, int arrayIndex)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (5)
58readonly bool ICollection<T>.IsReadOnly => false; 269void ICollection<T>.Add(T item) 270=> ((ICollection<T>)GetOrCreateMutableSet()).Add(item); 272readonly void ICollection<T>.CopyTo(T[] array, int arrayIndex) 273=> ((ICollection<T>)ReadOnlySet).CopyTo(array, arrayIndex);
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (5)
88bool ICollection<T>.IsReadOnly => true; 163if (items is ICollection<T> { Count: 0 }) 649void ICollection<T>.Add(T item) 652void ICollection<T>.Clear() 655bool ICollection<T>.Remove(T item)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
26bool ICollection<T>.IsReadOnly => ICollectionCalls<T>.IsReadOnly(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
37readonly bool ICollection<T>.IsReadOnly => false;
src\Dependencies\Collections\Internal\ICollectionCalls`1.cs (4)
10/// Provides static methods to invoke <see cref="ICollection{T}"/> members on value types that explicitly implement 21where TCollection : ICollection<T> 25where TCollection : ICollection<T> 29where TCollection : ICollection<T>
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (2)
19private readonly ICollection<T> _collection; 21public ICollectionDebugView(ICollection<T> collection)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (4)
41private readonly ICollection<TKey> _collection; 43public DictionaryKeyCollectionDebugView(ICollection<TKey> collection) 62private readonly ICollection<TValue> _collection; 64public DictionaryValueCollectionDebugView(ICollection<TValue> collection)
src\Dependencies\Collections\SegmentedArray`1.cs (8)
124int ICollection<T>.Count => Length; 161void ICollection<T>.CopyTo(T[] array, int arrayIndex) 165ICollection<T> collection = _items[i]; 194void ICollection<T>.Add(T value) 209void ICollection<T>.Clear() 226bool ICollection<T>.Contains(T value) 228foreach (ICollection<T> collection in _items) 282bool ICollection<T>.Remove(T value)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 1339bool ICollection<TKey>.IsReadOnly => true; 1341void ICollection<TKey>.Add(TKey item) 1344void ICollection<TKey>.Clear() 1350bool ICollection<TKey>.Remove(TKey item) 1547bool ICollection<TValue>.IsReadOnly => true; 1549void ICollection<TValue>.Add(TValue item) 1552bool ICollection<TValue>.Remove(TValue item) 1558void ICollection<TValue>.Clear() 1561bool ICollection<TValue>.Contains(TValue item)
src\Dependencies\Collections\SegmentedHashSet`1.cs (8)
118if (collection is ICollection<T> coll) 194void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _); 358bool ICollection<T>.IsReadOnly => false; 444if (other is ICollection<T> otherAsCollection) 583if (other is ICollection<T> otherAsCollection) 632if (other is ICollection<T> otherAsCollection) 676if (other is ICollection<T> otherAsCollection) 769other is ICollection<T> otherAsCollection &&
src\Dependencies\Collections\SegmentedList`1.cs (4)
85if (collection is ICollection<T> c) 184bool ICollection<T>.IsReadOnly => false; 302if (collection is ICollection<T> c) 902if (collection is ICollection<T> c)
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
168|| genType == typeof(ICollection<>)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
156new 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)
137public ICollection<SignatureVerificationResult> NestedResults 157public 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)
266case ICollection<T> collection:
Microsoft.Extensions.AI.Abstractions (29)
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);
Embeddings\GeneratedEmbeddings.cs (1)
59bool ICollection<TEmbedding>.IsReadOnly => false;
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)
266case ICollection<T> collection:
Microsoft.Extensions.AI.Abstractions.Tests (1)
Embeddings\GeneratedEmbeddingsTests.cs (1)
38Assert.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)
266case ICollection<T> collection:
Microsoft.Extensions.AI.Integration.Tests (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
266case 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)
266case 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)
266case ICollection<T> collection:
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
266case ICollection<T> collection:
Microsoft.Extensions.Caching.Abstractions (4)
Hybrid\HybridCache.cs (4)
79null or ICollection<string> { Count: 0 } => default, 80ICollection<string> { Count: 1 } => RemoveAsync(keys.First(), cancellationToken), 103null or ICollection<string> { Count: 0 } => default, 104ICollection<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)
266case ICollection<T> collection:
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
716private ICollection<KeyValuePair<string, CacheEntry>> StringEntriesCollection => _stringEntries; 717private ICollection<KeyValuePair<object, CacheEntry>> NonStringEntriesCollection => _nonStringEntries;
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
266case ICollection<T> collection:
Microsoft.Extensions.Compliance.Testing (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
431(interfaceGenericType == typeof(ICollection<>) || interfaceGenericType == typeof(IList<>))) 455Type? 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)
266case 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)
266case 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)
266case 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)
266case 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)
266case ICollection<T> collection:
Microsoft.Extensions.Diagnostics.Testing (1)
src\Shared\Throw\Throw.cs (1)
266case ICollection<T> collection:
Microsoft.Extensions.Hosting.Testing (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
266case ICollection<T> collection:
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\Shared\Throw\Throw.cs (1)
266case ICollection<T> collection:
Microsoft.Extensions.Options.Contextual (1)
src\Shared\Throw\Throw.cs (1)
266case 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)
266case 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)
266case ICollection<T> collection:
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
266case ICollection<T> collection:
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
266case ICollection<T> collection:
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)
1655 var names = context.Cache.GetResourceNamesInUse(parent); 1706 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)
MSBuild (17)
CopyOnWriteDictionary.cs (2)
114public ICollection<string> Keys => ((IDictionary<string, V>)_backing).Keys; 119public ICollection<V> Values => ((IDictionary<string, V>)_backing).Values;
OutOfProcTaskHostNode.cs (3)
290private ICollection<string> WarningsAsErrors { get; set; } 292private ICollection<string> WarningsNotAsErrors { get; set; } 294private ICollection<string> WarningsAsMessages { get; set; }
ReadOnlyEmptyDictionary.cs (2)
73public ICollection<K> Keys => 83public ICollection<V> Values =>
TaskHostConfiguration.cs (9)
95private ICollection<string> _warningsAsErrors; 96private ICollection<string> _warningsNotAsErrors; 98private ICollection<string> _warningsAsMessages; 162ICollection<string> warningsAsErrors, 163ICollection<string> warningsNotAsErrors, 164ICollection<string> warningsAsMessages) 381public ICollection<string> WarningsAsErrors 390public ICollection<string> WarningsNotAsErrors 399public ICollection<string> WarningsAsMessages
WindowsFileSystem.cs (1)
122ICollection<string> result)
MSBuildTaskHost (28)
BinaryTranslator.cs (4)
370public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T> 1106public void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T>
CopyOnWriteDictionary.cs (2)
114public ICollection<string> Keys => ((IDictionary<string, V>)_backing).Keys; 119public ICollection<V> Values => ((IDictionary<string, V>)_backing).Values;
Immutable\ImmutableDictionary.cs (6)
41public ICollection<K> Keys => _backing.Keys; 42public ICollection<V> Values => _backing.Values; 92void ICollection<KeyValuePair<K, V>>.CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 267void ICollection<KeyValuePair<K, V>>.Add(KeyValuePair<K, V> item) 272void ICollection<KeyValuePair<K, V>>.Clear() 277bool ICollection<KeyValuePair<K, V>>.Remove(KeyValuePair<K, V> item)
ITranslator.cs (2)
211void Translate<T, L>(ref ICollection<T> collection, ObjectTranslator<T> objectTranslator, NodePacketCollectionCreator<L> collectionFactory) where L : ICollection<T>;
OutOfProcTaskHostNode.cs (3)
290private ICollection<string> WarningsAsErrors { get; set; } 292private ICollection<string> WarningsNotAsErrors { get; set; } 294private ICollection<string> WarningsAsMessages { get; set; }
ReadOnlyEmptyDictionary.cs (2)
73public ICollection<K> Keys => 83public ICollection<V> Values =>
TaskHostConfiguration.cs (9)
95private ICollection<string> _warningsAsErrors; 96private ICollection<string> _warningsNotAsErrors; 98private ICollection<string> _warningsAsMessages; 162ICollection<string> warningsAsErrors, 163ICollection<string> warningsNotAsErrors, 164ICollection<string> warningsAsMessages) 381public ICollection<string> WarningsAsErrors 390public ICollection<string> WarningsNotAsErrors 399public ICollection<string> WarningsAsMessages
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)
622public ICollection<int> Keys 673public ICollection<ushort> Values
MS\Internal\FontCache\FontSourceCollection.cs (1)
89ICollection<string> files;
MS\Internal\FontFace\CompositeFontInfo.cs (1)
350internal ICollection<XmlLanguage> FamilyMapLanguages
MS\Internal\FontFace\FontDriver.cs (1)
240internal byte[] ComputeFontSubset(ICollection<ushort> glyphs)
MS\Internal\FontFace\IFontFamily.cs (1)
105ICollection<Typeface> GetTypefaces(FontFamilyIdentifier familyIdentifier);
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
436ICollection<Typeface> IFontFamily.GetTypefaces(FontFamilyIdentifier familyIdentifier)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
193ICollection<ApplicationGesture> collection = applicationGestures as ICollection<ApplicationGesture>;
MS\Internal\Shaping\CompositeFontFamily.cs (1)
258ICollection<Typeface> IFontFamily.GetTypefaces(FontFamilyIdentifier familyIdentifier)
MS\Internal\Shaping\TypefaceMap.cs (1)
130SpanVector itemSpans = new SpanVector(null, new FrugalStructList<Span>((ICollection<Span>)spans));
MS\Internal\TextFormatting\LineServicesCallbacks.cs (2)
3480private ICollection<IndexedGlyphRun> _indexedGlyphRuns; 3491internal ICollection<IndexedGlyphRun> IndexedGlyphRuns
System\Windows\FreezableCollection.cs (4)
373bool ICollection<T>.IsReadOnly 410return ((ICollection<T>)this).IsReadOnly; 658ICollection<T> enumerableAsICollectionT = enumerable as ICollection<T>;
System\Windows\Generated\TextDecorationCollection.cs (4)
281bool ICollection<TextDecoration>.IsReadOnly 318return ((ICollection<TextDecoration>)this).IsReadOnly; 889ICollection<TextDecoration> icollectionOfT = collection as ICollection<TextDecoration>;
System\Windows\Ink\Stroke.cs (2)
1148ICollection<Point> icol = ienum as ICollection<Point>;
System\Windows\Ink\StrokeCollection.cs (1)
873bool ICollection<Stroke>.IsReadOnly
System\Windows\Input\ManipulationLogic.cs (2)
355internal void ReportFrame(ICollection<IManipulator> manipulators) 515private void UpdateManipulators(ICollection<IManipulator> updatedManipulators)
System\Windows\Media\Animation\Generated\TimelineCollection.cs (4)
280bool ICollection<Timeline>.IsReadOnly 317return ((ICollection<Timeline>)this).IsReadOnly; 897ICollection<Timeline> icollectionOfT = collection as ICollection<Timeline>;
System\Windows\Media\CharacterMetricsDictionary.cs (2)
252public ICollection<int> Keys 261public ICollection<CharacterMetrics> Values
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
221public ICollection<XmlLanguage> Keys 230public ICollection<string> Values
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (4)
280bool ICollection<BitmapEffect>.IsReadOnly 317return ((ICollection<BitmapEffect>)this).IsReadOnly; 888ICollection<BitmapEffect> icollectionOfT = collection as ICollection<BitmapEffect>;
System\Windows\Media\FamilyTypefaceCollection.cs (2)
15private ICollection<Typeface> _innerList; 32internal FamilyTypefaceCollection(ICollection<Typeface> innerList)
System\Windows\Media\FontEmbeddingManager.cs (2)
66public ICollection<Uri> GlyphTypefaceUris 83public ICollection<ushort> GetUsedGlyphs(Uri glyphTypeface)
System\Windows\Media\FontFamily.cs (1)
244public ICollection<Typeface> GetTypefaces()
System\Windows\Media\Fonts.cs (11)
41public static ICollection<FontFamily> GetFontFamilies(string location) 58public static ICollection<FontFamily> GetFontFamilies(Uri baseUri) 81public static ICollection<FontFamily> GetFontFamilies(Uri baseUri, string location) 134public static ICollection<Typeface> GetTypefaces(string location) 151public static ICollection<Typeface> GetTypefaces(Uri baseUri) 173public static ICollection<Typeface> GetTypefaces(Uri baseUri, string location) 192public static ICollection<FontFamily> SystemFontFamilies 204public static ICollection<Typeface> SystemTypefaces 232private static ICollection<FontFamily> CreateFamilyCollection( 260private static ICollection<FontFamily> CreateDefaultFamilyCollection() 394private static readonly ICollection<FontFamily> _defaultFontCollection = CreateDefaultFamilyCollection();
System\Windows\Media\Generated\DoubleCollection.cs (4)
235bool ICollection<double>.IsReadOnly 272return ((ICollection<double>)this).IsReadOnly; 912ICollection<double> icollectionOfT = collection as ICollection<double>;
System\Windows\Media\Generated\DrawingCollection.cs (4)
293bool ICollection<Drawing>.IsReadOnly 330return ((ICollection<Drawing>)this).IsReadOnly; 928ICollection<Drawing> icollectionOfT = collection as ICollection<Drawing>;
System\Windows\Media\Generated\GeneralTransformCollection.cs (4)
278bool ICollection<GeneralTransform>.IsReadOnly 315return ((ICollection<GeneralTransform>)this).IsReadOnly; 886ICollection<GeneralTransform> icollectionOfT = collection as ICollection<GeneralTransform>;
System\Windows\Media\Generated\GeometryCollection.cs (4)
293bool ICollection<Geometry>.IsReadOnly 330return ((ICollection<Geometry>)this).IsReadOnly; 928ICollection<Geometry> icollectionOfT = collection as ICollection<Geometry>;
System\Windows\Media\Generated\GradientStopCollection.cs (4)
279bool ICollection<GradientStop>.IsReadOnly 316return ((ICollection<GradientStop>)this).IsReadOnly; 990ICollection<GradientStop> icollectionOfT = collection as ICollection<GradientStop>;
System\Windows\Media\Generated\Int32Collection.cs (4)
234bool ICollection<int>.IsReadOnly 271return ((ICollection<int>)this).IsReadOnly; 911ICollection<int> icollectionOfT = collection as ICollection<int>;
System\Windows\Media\Generated\PathFigureCollection.cs (4)
284bool ICollection<PathFigure>.IsReadOnly 321return ((ICollection<PathFigure>)this).IsReadOnly; 981ICollection<PathFigure> icollectionOfT = collection as ICollection<PathFigure>;
System\Windows\Media\Generated\PathSegmentCollection.cs (4)
278bool ICollection<PathSegment>.IsReadOnly 315return ((ICollection<PathSegment>)this).IsReadOnly; 886ICollection<PathSegment> icollectionOfT = collection as ICollection<PathSegment>;
System\Windows\Media\Generated\PointCollection.cs (4)
234bool ICollection<Point>.IsReadOnly 271return ((ICollection<Point>)this).IsReadOnly; 913ICollection<Point> icollectionOfT = collection as ICollection<Point>;
System\Windows\Media\Generated\TextEffectCollection.cs (4)
278bool ICollection<TextEffect>.IsReadOnly 315return ((ICollection<TextEffect>)this).IsReadOnly; 886ICollection<TextEffect> icollectionOfT = collection as ICollection<TextEffect>;
System\Windows\Media\Generated\TransformCollection.cs (4)
293bool ICollection<Transform>.IsReadOnly 330return ((ICollection<Transform>)this).IsReadOnly; 928ICollection<Transform> icollectionOfT = collection as ICollection<Transform>;
System\Windows\Media\Generated\VectorCollection.cs (4)
234bool ICollection<Vector>.IsReadOnly 271return ((ICollection<Vector>)this).IsReadOnly; 913ICollection<Vector> icollectionOfT = collection as ICollection<Vector>;
System\Windows\Media\GlyphTypeface.cs (3)
222public byte[] ComputeSubset(ICollection<ushort> glyphs) 1746public ICollection<ushort> Keys 1770public ICollection<double> Values
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
231internal ICollection<IndexedGlyphRun> IndexedGlyphRuns
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (4)
278bool ICollection<GeneralTransform3D>.IsReadOnly 315return ((ICollection<GeneralTransform3D>)this).IsReadOnly; 886ICollection<GeneralTransform3D> icollectionOfT = collection as ICollection<GeneralTransform3D>;
System\Windows\Media3D\Generated\MaterialCollection.cs (4)
293bool ICollection<Material>.IsReadOnly 330return ((ICollection<Material>)this).IsReadOnly; 928ICollection<Material> icollectionOfT = collection as ICollection<Material>;
System\Windows\Media3D\Generated\Model3DCollection.cs (4)
293bool ICollection<Model3D>.IsReadOnly 330return ((ICollection<Model3D>)this).IsReadOnly; 928ICollection<Model3D> icollectionOfT = collection as ICollection<Model3D>;
System\Windows\Media3D\Generated\Point3DCollection.cs (4)
235bool ICollection<Point3D>.IsReadOnly 272return ((ICollection<Point3D>)this).IsReadOnly; 915ICollection<Point3D> icollectionOfT = collection as ICollection<Point3D>;
System\Windows\Media3D\Generated\Transform3DCollection.cs (4)
293bool ICollection<Transform3D>.IsReadOnly 330return ((ICollection<Transform3D>)this).IsReadOnly; 928ICollection<Transform3D> icollectionOfT = collection as ICollection<Transform3D>;
System\Windows\Media3D\Generated\Vector3DCollection.cs (4)
235bool ICollection<Vector3D>.IsReadOnly 272return ((ICollection<Vector3D>)this).IsReadOnly; 915ICollection<Vector3D> icollectionOfT = collection as ICollection<Vector3D>;
System\Windows\Media3D\Visual3DCollection.cs (1)
291bool ICollection<Visual3D>.IsReadOnly
PresentationFramework (44)
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
472ICollection<AnnotationResource> cargos = annot.Cargos;
MS\Internal\Annotations\ObservableDictionary.cs (10)
152void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair) 154((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair); 163bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair) 165return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair); 174bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair) 176return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair); 186void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex) 192((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex); 278public ICollection<string> Keys 290public ICollection<string> Values
MS\Internal\Annotations\TextAnchor.cs (5)
188internal bool IsOverlapping(ICollection<TextSegment> textSegments) 278internal static TextAnchor TrimToRelativeComplement(TextAnchor anchor, ICollection<TextSegment> textSegments) 380internal static TextAnchor TrimToIntersectionWith(TextAnchor anchor, ICollection<TextSegment> textSegments) 590private static ICollection<TextSegment> SortTextSegments(ICollection<TextSegment> textSegments, bool excludeZeroLength)
MS\Internal\Data\LiveShapingList.cs (1)
716ICollection<DependencyProperty> usedDPs = this.Values;
MS\Internal\Documents\ContentElementCollection.cs (1)
546/// <see cref="ICollection&lt;T&gt;.IsReadOnly"/>
MS\Internal\ListOfObject.cs (7)
55void ICollection<object>.Add(object item) 60void ICollection<object>.Clear() 65bool ICollection<object>.Contains(object item) 70void ICollection<object>.CopyTo(object[] array, int arrayIndex) 75int ICollection<object>.Count 80bool ICollection<object>.IsReadOnly 85bool ICollection<object>.Remove(object item)
MS\Internal\WeakDictionary.cs (2)
201public ICollection<TKey> Keys 234public ICollection<TValue> Values
System\Windows\Annotations\LocatorPart.cs (1)
395foreach (KeyValuePair<string, string> k_v in ((ICollection<KeyValuePair<string, string>>)this.NameValuePairs))
System\Windows\Controls\CustomDictionarySources.cs (8)
142void ICollection<Uri>.Add(Uri item) 153void ICollection<Uri>.Clear() 159bool ICollection<Uri>.Contains(Uri item) 164void ICollection<Uri>.CopyTo(Uri[] array, int arrayIndex) 169int ICollection<Uri>.Count 177bool ICollection<Uri>.IsReadOnly 181return ((ICollection<Uri>)_uriList).IsReadOnly; 185bool ICollection<Uri>.Remove(Uri item)
System\Windows\Controls\TextChangedEventArgs.cs (3)
69public TextChangedEventArgs(RoutedEvent id, UndoAction action, ICollection<TextChange> changes) : base() 134public ICollection<TextChange> Changes 161private readonly ICollection<TextChange> _changes;
System\Windows\Documents\FixedDocument.cs (2)
1153ICollection<FixedPage> newHighlightPages = _highlights.Keys as ICollection<FixedPage>;
System\Windows\Documents\TableColumnCollection.cs (1)
367/// <see cref="ICollection&lt;T&gt;.IsReadOnly"/>
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
42public override ICollection<XamlType> GetAllXamlTypes(string xamlNamespace)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
503if (typeof(ICollection<System.Windows.Data.XmlNamespaceMapping>).IsAssignableFrom(UnderlyingType)
PresentationUI (4)
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
406ICollection<XpsSignatureDefinition> documentSignatureDefinitionList =
MS\Internal\Documents\RightsManagementProvider.cs (3)
662ICollection<ContentGrant> licenseGrants = 1326private ICollection<ContentGrant> GetGrantsFromUnsignedLicense( 1329ICollection<ContentGrant> grants = null;
ReachFramework (13)
packaging\XpsDigitalSignature.cs (2)
309ICollection<Uri> containingCollection, 310ICollection<Uri> containedCollection
Packaging\XpsFixedDocumentReaderWriter.cs (2)
93ICollection<XpsSignatureDefinition> 352ICollection<XpsSignatureDefinition>
Packaging\XpsFixedPageReaderWriter.cs (8)
156ICollection<XpsFont> 162ICollection<XpsColorContext> 168ICollection<XpsResourceDictionary> 174ICollection<XpsImage> 632public ICollection<XpsFont> 645public ICollection<XpsColorContext> 659public ICollection<XpsResourceDictionary> 673public ICollection<XpsImage>
Serialization\XpsFontSubsetter.cs (1)
587ICollection<ushort> glyphs,
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)
266case 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 (58)
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)
47internal 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)
201this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 246bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 267ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys; 279ICollection<TValue> IDictionary<TKey, TValue>.Values => Values; 1188void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value); 1191bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 1201void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 1218bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => 1299((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index); 1367((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair); 1476bool ICollection<TKey>.IsReadOnly => true; 1598void ICollection<TKey>.Add(TKey item) => throw new NotSupportedException(); 1601void ICollection<TKey>.Clear() => throw new NotSupportedException(); 1607bool ICollection<TKey>.Remove(TKey item) => throw new NotSupportedException(); 1671bool ICollection<TValue>.IsReadOnly => true; 1729bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item); 1759void ICollection<TValue>.Add(TValue item) => throw new NotSupportedException(); 1762void ICollection<TValue>.Clear() => throw new NotSupportedException(); 1768bool 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 594bool ICollection<TKey>.IsReadOnly 599void ICollection<TKey>.Add(TKey item) 604void ICollection<TKey>.Clear() 614bool ICollection<TKey>.Remove(TKey item) 755bool ICollection<TValue>.IsReadOnly 760void ICollection<TValue>.Add(TValue item) 765void ICollection<TValue>.Clear() 770bool ICollection<TValue>.Contains(TValue item) 775bool 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\Generic\Stack.cs (1)
65/// <inheritdoc cref="ICollection{T}"/>
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) 1596public ICollection<TKey> Keys => GetKeys(); 1605public ICollection<TValue> Values => GetValues(); 1614/// Adds the specified value to the <see cref="ICollection{TValue}"/> 1627void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value); 1630/// Determines whether the <see cref="ICollection{T}"/> 1635/// cref="ICollection{TValue}"/>.</param> 1637/// cref="ICollection{T}"/>; otherwise, false.</returns> 1638bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) => 1645/// <value>true if the <see cref="ICollection{T}"/> is 1649bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 1662bool 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)
289ICollection<TKey> IDictionary<TKey, TValue>.Keys => 310ICollection<TValue> IDictionary<TKey, TValue>.Values => 415bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 556bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => 606void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 615bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 621void 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)
216ICollection<TKey> IDictionary<TKey, TValue>.Keys 224ICollection<TValue> IDictionary<TKey, TValue>.Values 269bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 594void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 599void ICollection<KeyValuePair<TKey, TValue>>.Clear() 604bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 609void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 635/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only. 637/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false. 645/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>. 648/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>. 656/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>. 659/// 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)
244ICollection<string> keys = (ICollection<string>)Keys;
System.Diagnostics.DiagnosticSource (4)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (1)
38if (tags2 is ICollection<KeyValuePair<string, object?>> tagsCol)
System\Diagnostics\ActivityTagsCollection.cs (2)
100public ICollection<string> Keys 116public ICollection<object?> Values
System\Diagnostics\Metrics\Measurement.cs (1)
111if (tags is ICollection<KeyValuePair<string, object?>> collection)
System.Diagnostics.Process (2)
System\Collections\Specialized\DictionaryWrapper.cs (2)
29public ICollection<string> Keys => _contents.Keys; 30public ICollection<string?> Values => _contents.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; 187if (_source is ICollection<TSource> c) 234if (_source is ICollection<TSource> sourceCollection) 279return !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>; 172var collection = source as ICollection<TSource>; 242ICollection<TSource> source = (ICollection<TSource>)node._head; 256var second = (ICollection<TSource>)previous2._second; 266var first = (ICollection<TSource>)previous2._first;
System\Linq\Contains.cs (1)
11source is ICollection<TSource> collection ? collection.Contains(value) :
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)
107void ICollection<int>.Add(int item) => ThrowHelper.ThrowNotSupportedException(); 108void ICollection<int>.Clear() => ThrowHelper.ThrowNotSupportedException(); 110bool ICollection<int>.Remove(int 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)
191void ICollection<TSource>.Add(TSource item) => ThrowHelper.ThrowNotSupportedException(); 192void ICollection<TSource>.Clear() => ThrowHelper.ThrowNotSupportedException(); 194bool 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)
413int ICollection<TElement>.Count => _count; 415bool ICollection<TElement>.IsReadOnly => true; 417void ICollection<TElement>.Add(TElement item) => throw new NotSupportedException(); 419void ICollection<TElement>.Clear() => throw new NotSupportedException(); 421bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0; 423void ICollection<TElement>.CopyTo(TElement[] array, int arrayIndex) => 426bool 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 (24)
System\Net\Http\Headers\CacheControlHeaderValue.cs (3)
87public ICollection<string> NoCacheHeaders => _noCacheHeaders ??= new TokenObjectCollection(); 149public ICollection<string> PrivateHeaders => _privateHeaders ??= new TokenObjectCollection(); 163public ICollection<NameValueHeaderValue> Extensions => _extensions ??= new UnvalidatedObjectCollection<NameValueHeaderValue>();
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
42public ICollection<NameValueHeaderValue> Parameters => _parameters ??= new UnvalidatedObjectCollection<NameValueHeaderValue>();
System\Net\Http\Headers\HttpContentHeaders.cs (3)
17public ICollection<string> Allow => 28public ICollection<string> ContentEncoding => 31public ICollection<string> ContentLanguage =>
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
61public ICollection<NameValueHeaderValue> Parameters => _parameters ??= new UnvalidatedObjectCollection<NameValueHeaderValue>();
System\Net\Http\Headers\NameValueWithParametersHeaderValue.cs (1)
20public ICollection<NameValueHeaderValue> Parameters =>
System\Net\Http\Headers\ObjectCollection.cs (1)
18/// <summary>An <see cref="ICollection{T}"/> list that prohibits null elements and that is optimized for a small number of elements.</summary>
System\Net\Http\Headers\RangeHeaderValue.cs (1)
27public ICollection<RangeItemHeaderValue> Ranges => _ranges ??= new UnvalidatedObjectCollection<RangeItemHeaderValue>();
System\Net\Http\Headers\RangeItemHeaderValue.cs (1)
80ICollection<RangeItemHeaderValue> rangeCollection)
System\Net\Http\Headers\TransferCodingHeaderValue.cs (1)
20public ICollection<NameValueHeaderValue> Parameters => _parameters ??= new UnvalidatedObjectCollection<NameValueHeaderValue>();
System\Net\Http\HttpRequestOptions.cs (9)
33ICollection<string> IDictionary<string, object?>.Keys => Options.Keys; 34ICollection<object?> IDictionary<string, object?>.Values => Options.Values; 35int ICollection<KeyValuePair<string, object?>>.Count => Options.Count; 36bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => ((IDictionary<string, object?>)Options).IsReadOnly; 38void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Add(item); 39void ICollection<KeyValuePair<string, object?>>.Clear() => Options.Clear(); 40bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Contains(item); 42void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) => 47bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Remove(item);
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
72ICollection<string> contentEncodings = response.Content.Headers.ContentEncoding;
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
128((ICollection<KeyValuePair<Uri, long>>)_failedProxies).Remove(kvp);
System.Net.NameResolution (2)
System\Net\Dns.cs (2)
713((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task!)); 726((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task));
System.Net.Primitives (1)
System\Net\CookieContainer.cs (1)
577foreach (Cookie c in (ICollection<Cookie>)cookies)
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 (83)
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\Generic\Queue.cs (1)
62/// <inheritdoc cref="ICollection{T}"/>
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)
47internal 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)
5941if (tasks is ICollection<Task> taskCollection) 6248if (tasks is ICollection<Task<TResult>> taskCollection) 6723if (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)
78where 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 (1)
System\Security\Cryptography\Helpers.cs (1)
18internal static void AddRange<T>(this ICollection<T> coll, IEnumerable<T> newData)
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 (15)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
91public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null) 107ICollection<T> children = getChildren(next);
System\Text\Json\Nodes\JsonArray.IList.cs (2)
211void ICollection<JsonNode?>.CopyTo(JsonNode?[] array, int index) => List.CopyTo(array, index); 230bool 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)
130bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) => 150void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) => 170bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key); 175ICollection<string> IDictionary<string, JsonNode?>.Keys => Dictionary.Keys; 180ICollection<JsonNode?> IDictionary<string, JsonNode?>.Values => Dictionary.Values; 209bool 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\Metadata\JsonMetadataServices.Collections.cs (2)
221/// Creates serialization metadata for types assignable to <see cref="ICollection{T}"/>. 232where 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)
91public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null) 107ICollection<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)
194ICollection<Cursor> values = converter.GetStandardValues().Cast<Cursor>().ToArray();
System\Windows\Forms\ListBindingHelperTests.cs (2)
130yield return new object[] { typeof(ICollection<int>), typeof(ICollection<int>) };
System.Xaml (45)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1302public ArrayItemList(ICollection<T> collection) 1989public FrugalStructList(ICollection<T> collection)
System\Xaml\AttachablePropertyServices.cs (1)
133((ICollection<KeyValuePair<AttachableMemberIdentifier, object>>)instanceProperties).CopyTo(array, index);
System\Xaml\MS\Impl\XmlNsInfo.cs (3)
58private ICollection<AssemblyName> _internalsVisibleTo; 59internal ICollection<AssemblyName> InternalsVisibleTo 245ICollection<AssemblyName> LoadInternalsVisibleTo()
System\Xaml\NameScope.cs (2)
221public ICollection<string> Keys 240public ICollection<object> Values
System\Xaml\NameScopeDictionary.cs (9)
245int ICollection<KeyValuePair<string, object>>.Count 253bool ICollection<KeyValuePair<string, object>>.IsReadOnly 261void ICollection<KeyValuePair<string, object>>.Clear() 266void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 271bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 276void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 281bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 321ICollection<string> IDictionary<string, object>.Keys 329ICollection<object> IDictionary<string, object>.Values
System\Xaml\Schema\CollectionReflector.cs (2)
114Type genericICollection = GetGenericInterface(type, typeof(ICollection<>), out hasMoreThanOneICollection); 258Type genericICollection = typeof(ICollection<>).MakeGenericType(itemType);
System\Xaml\Schema\TypeReflector.cs (4)
225internal ICollection<XamlMember> ExcludedReadOnlyMembers { get; set; } 465internal void LookupAllMembers(out ICollection<PropertyInfo> newProperties, 466out ICollection<EventInfo> newEvents, out List<XamlMember> knownMembers) 549private ICollection<EventInfo> FilterEvents(EventInfo[] eventList, List<XamlMember> knownMembers)
System\Xaml\Schema\XamlNamespace.cs (3)
20private ICollection<XamlType> _allPublicTypes; 52public ICollection<XamlType> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes(); 204private ICollection<XamlType> LookupAllTypes()
System\Xaml\XamlObjectReader.cs (2)
1621var properties = valueXamlType.GetAllMembers(); 1622var readOnlyProperties = valueXamlType.GetAllExcludedReadOnlyMembers();
System\Xaml\XamlSchemaContext.cs (8)
97public virtual ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 591ICollection<XamlMember> members = type.GetAllMembers(); 785ICollection<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)
363public ICollection<XamlMember> GetAllMembers() 412public ICollection<XamlMember> GetAllAttachableMembers() 633internal ICollection<XamlMember> GetAllExcludedReadOnlyMembers() 1067ICollection<PropertyInfo> properties; 1068ICollection<EventInfo> events; 1648private ICollection<XamlMember> LookupAllExcludedReadOnlyMembers() 1656ICollection<XamlMember> allMembers = GetAllMembers();
System\Xaml\XamlXmlWriter.cs (2)
2017var properties = objectXamlType.GetAllMembers(); 2018var 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)
68var 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)
68var 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)
68var 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)
68var browsers = _browsers.Values;
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