7 interfaces inheriting from ICollection
dotnet-svcutil-lib (1)
Microsoft.Build (1)
Collections\RetrievableEntryHashSet\IRetrievableEntryHashSet.cs (1)
18ICollection<T>,
Microsoft.Maui (1)
System.Private.CoreLib (3)
System.ServiceModel.Primitives (1)
206 implementations of ICollection
aspire (1)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (1)
dotnet-svcutil-lib (1)
GenerateDocumentationAndConfigFiles (12)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.Build (16)
Microsoft.Build.Framework (2)
Microsoft.CodeAnalysis (13)
Microsoft.CodeAnalysis.Analyzers (12)
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
Microsoft.CodeAnalysis.CodeStyle (11)
Microsoft.CodeAnalysis.Extensions.Package (10)
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.CodeAnalysis.Razor.Compiler (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (12)
Microsoft.CodeAnalysis.Workspaces (11)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (2)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
Mono.Cecil (1)
PresentationCore (6)
PresentationFramework (5)
Roslyn.Diagnostics.Analyzers (12)
Shared (1)
Shared.Tests (1)
System.Collections (4)
System.Collections.Immutable (4)
System.CommandLine (1)
System.ComponentModel.Composition (3)
System.Data.OleDb (1)
System.DirectoryServices.AccountManagement (2)
System.Linq (2)
System\Linq\Lookup.cs (2)
280internal sealed class CollectionLookup<TKey, TElement> : Lookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
320internal sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
System.Linq.Expressions (2)
System.Net.Http (2)
System.Net.HttpListener (1)
System.Net.NetworkInformation (4)
System.Net.Primitives (2)
System.Private.CoreLib (6)
System.Security.Principal.Windows (1)
System.ServiceModel.Primitives (1)
System.Windows.Forms (1)
System.Windows.Forms.Primitives (1)
4056 references to ICollection
aspire (3)
Aspire.Dashboard (3)
Model\Otlp\ResourcesSelectHelpers.cs (3)
10public static SelectViewModel<ResourceTypeDetails> GetResource(this ICollection<SelectViewModel<ResourceTypeDetails>> resources, ILogger logger, string? name, bool canSelectGrouping, SelectViewModel<ResourceTypeDetails> fallbackViewModel)
49static SelectViewModel<ResourceTypeDetails> SingleMatch(ICollection<SelectViewModel<ResourceTypeDetails>> resources, ILogger logger, string name, SelectViewModel<ResourceTypeDetails> match, bool fallback = false)
64static SelectViewModel<ResourceTypeDetails> MultipleMatches(ICollection<SelectViewModel<ResourceTypeDetails>> resources, ILogger logger, string name, List<SelectViewModel<ResourceTypeDetails>> matches)
Aspire.Hosting (1)
Aspire.Hosting.RemoteHost (1)
Aspire.Microsoft.Azure.Cosmos.Tests (3)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (2)
dotnet (2)
dotnet-aot (1)
dotnet-dev-certs (2)
dotnet-openapi (3)
dotnet-svcutil-lib (170)
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\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\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)
GenerateDocumentationAndConfigFiles (131)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
ILAssembler (1)
ILCompiler.Compiler (7)
ILCompiler.ReadyToRun (3)
illink (3)
Microsoft.Analyzers.Extra (3)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore (5)
Microsoft.AspNetCore.AsyncState (1)
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.OAuth (5)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.WsFederation (3)
Microsoft.AspNetCore.Components (7)
Microsoft.AspNetCore.Components.Endpoints (19)
TempData\TempData.cs (10)
115ICollection<string> IDictionary<string, object?>.Keys => Data.Keys;
117ICollection<object?> IDictionary<string, object?>.Values => Data.Values;
119int ICollection<KeyValuePair<string, object?>>.Count => Data.Count;
120bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => ((ICollection<KeyValuePair<string, object?>>)Data).IsReadOnly;
137void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item)
142bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item)
147void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex)
149((ICollection<KeyValuePair<string, object?>>)Data).CopyTo(array, arrayIndex);
152bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Components.QuickGrid (3)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
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)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
Microsoft.AspNetCore.Diagnostics (5)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (16)
parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Hosting (10)
Microsoft.AspNetCore.Hosting.Server.Abstractions (2)
Microsoft.AspNetCore.Http (33)
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;
src\aspnetcore\src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (11)
149bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
152public ICollection<TKey> Keys
177public ICollection<TValue> Values
202void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
210((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item);
263bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
267return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item);
290void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(
313((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex);
345bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
367return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item);
Microsoft.AspNetCore.Http.Abstractions (7)
Microsoft.AspNetCore.Http.Extensions (8)
Microsoft.AspNetCore.Http.Features (10)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.HttpOverrides (14)
Microsoft.AspNetCore.Mvc.Abstractions (4)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
Microsoft.AspNetCore.Mvc.Core (37)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.TagHelpers (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
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);
Microsoft.AspNetCore.Owin (27)
DictionaryStringArrayWrapper.cs (9)
32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count;
34bool ICollection<KeyValuePair<string, string[]>>.IsReadOnly => Inner.IsReadOnly;
36ICollection<string> IDictionary<string, string[]>.Keys => Inner.Keys;
38ICollection<string[]> IDictionary<string, string[]>.Values => Inner.Values.Select(Convert).ToList();
40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item));
44void ICollection<KeyValuePair<string, string[]>>.Clear() => Inner.Clear();
46bool ICollection<KeyValuePair<string, string[]>>.Contains(KeyValuePair<string, string[]> item) => Inner.Contains(Convert(item));
50void ICollection<KeyValuePair<string, string[]>>.CopyTo(KeyValuePair<string, string[]>[] array, int arrayIndex)
64bool ICollection<KeyValuePair<string, string[]>>.Remove(KeyValuePair<string, string[]> item) => Inner.Remove(Convert(item));
DictionaryStringValuesWrapper.cs (9)
77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count;
79bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => Inner.IsReadOnly;
81ICollection<string> IDictionary<string, StringValues>.Keys => Inner.Keys;
83ICollection<StringValues> IDictionary<string, StringValues>.Values => Inner.Values.Select(Convert).ToList();
85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item));
89void ICollection<KeyValuePair<string, StringValues>>.Clear() => Inner.Clear();
91bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) => Inner.Contains(Convert(item));
95void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
109bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item));
OwinEnvironment.cs (9)
84ICollection<string> IDictionary<string, object>.Keys
108ICollection<object> IDictionary<string, object>.Values
161void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
166void ICollection<KeyValuePair<string, object>>.Clear()
172bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
177void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
193int ICollection<KeyValuePair<string, object>>.Count
198bool ICollection<KeyValuePair<string, object>>.IsReadOnly
203bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.Razor.Runtime (6)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.Routing (13)
Microsoft.AspNetCore.Server.HttpSys (12)
src\aspnetcore\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.IIS (11)
src\aspnetcore\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\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)
Microsoft.AspNetCore.Session (4)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.Testing (1)
Microsoft.Build (416)
Collections\CopyOnWritePropertyDictionary.cs (7)
67ICollection<string> IDictionary<string, T>.Keys => ((IDictionary<string, T>)_backing).Keys;
72ICollection<T> IDictionary<string, T>.Values => ((IDictionary<string, T>)_backing).Values;
77bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false;
278void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
286bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item)
299void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex)
305bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
Collections\PropertyDictionary.cs (21)
114ICollection<string> IDictionary<string, T>.Keys
115=> InternalError.Throw<ICollection<string>>("Keys is not supported on PropertyDictionary.");
121ICollection<T> IDictionary<string, T>.Values
136int ICollection<KeyValuePair<string, T>>.Count => Count;
142bool ICollection<KeyValuePair<string, T>>.IsReadOnly => ((ICollection<T>)_properties).IsReadOnly;
153return ((ICollection<T>)_properties).Count;
158bool ICollection<T>.IsReadOnly => false;
231((ICollection<T>)_properties).Clear();
412void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
420void ICollection<KeyValuePair<string, T>>.Clear()
428bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item)
444void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex)
450bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
459void ICollection<T>.Add(T item) => Set(item);
462bool ICollection<T>.Contains(T item)
469void ICollection<T>.CopyTo(T[] array, int arrayIndex)
478bool ICollection<T>.Remove(T item) => Remove(item.Key);
566var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default);
588foreach (var kvp in (ICollection<T>)_properties)
624ICollection<T> propertiesCollection = _properties;
Graph\GraphBuildRequestData.cs (14)
33public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild)
44public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices)
56public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
71public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices)
84public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
94public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild)
105public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices)
117public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
127public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild)
138public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices)
150public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
158public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions graphBuildOptions)
169private GraphBuildRequestData(ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions? graphBuildOptions = null)
246public new ICollection<string> TargetNames => base.TargetNames;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
src\9f0d3f3da306d8cf\ICollectionExtensions.cs (8)
16public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
27public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
33public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
39public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
50public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
59public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
68public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
77public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
Microsoft.Build.Framework (22)
Microsoft.Build.Tasks.Core (8)
Microsoft.Build.Utilities.Core (7)
Microsoft.CodeAnalysis (149)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.Analyzers (131)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.AnalyzerUtilities (134)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.CodeStyle (132)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp (44)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
52nameof(ICollection<>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
52nameof(ICollection<>),
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.Extensions.Package (123)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.Features (9)
Microsoft.CodeAnalysis.NetAnalyzers (9)
Microsoft.CodeAnalysis.Razor.Compiler (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (131)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (128)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (9)
Microsoft.CSharp (3)
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))
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)
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)
Microsoft.DotNet.Cli.Definitions (2)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.TemplateLocator (2)
Microsoft.Extensions.AI (20)
parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Extensions.AI.Abstractions (40)
AdditionalPropertiesDictionary{TValue}.cs (11)
68public ICollection<string> Keys => _dictionary.Keys;
71public ICollection<TValue> Values => _dictionary.Values;
77bool ICollection<KeyValuePair<string, TValue>>.IsReadOnly => false;
108void ICollection<KeyValuePair<string, TValue>>.Add(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Add(item);
114bool ICollection<KeyValuePair<string, TValue>>.Contains(KeyValuePair<string, TValue> item) =>
115((ICollection<KeyValuePair<string, TValue>>)_dictionary).Contains(item);
121void ICollection<KeyValuePair<string, TValue>>.CopyTo(KeyValuePair<string, TValue>[] array, int arrayIndex) =>
122((ICollection<KeyValuePair<string, TValue>>)_dictionary).CopyTo(array, arrayIndex);
140bool ICollection<KeyValuePair<string, TValue>>.Remove(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Remove(item);
Functions\AIFunctionArguments.cs (10)
105public ICollection<string> Keys => _arguments.Keys;
108public ICollection<object?> Values => _arguments.Values;
114bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false;
126void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) =>
127((ICollection<KeyValuePair<string, object?>>)_arguments).Add(item);
133bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) =>
134((ICollection<KeyValuePair<string, object?>>)_arguments).Contains(item);
141((ICollection<KeyValuePair<string, object?>>)_arguments).CopyTo(array, arrayIndex);
150bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) =>
151((ICollection<KeyValuePair<string, object?>>)_arguments).Remove(item);
parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Console (2)
Microsoft.Extensions.AI.Evaluation.NLP (1)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.AmbientMetadata.Application (1)
Microsoft.Extensions.AmbientMetadata.Build (1)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.Caching.Abstractions (4)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Configuration (2)
Microsoft.Extensions.Configuration.Binder (2)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Microsoft.Extensions.DataIngestion (1)
Microsoft.Extensions.DataIngestion.Abstractions (1)
Microsoft.Extensions.DataIngestion.Markdig (1)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DependencyInjection (2)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (2)
Microsoft.Extensions.Diagnostics.Probes (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes (1)
Microsoft.Extensions.Diagnostics.Testing (11)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http.Diagnostics (16)
parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
Microsoft.Extensions.Options.Contextual (1)
Microsoft.Extensions.Options.SourceGeneration (2)
Microsoft.Extensions.Primitives (6)
Microsoft.Extensions.Resilience (1)
Microsoft.Extensions.Resilience.Tests (2)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
Microsoft.Extensions.ServiceDiscovery.Dns (1)
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Extensions.VectorData.Abstractions (4)
HybridSearchOptions.cs (2)
26/// If this property isn't set, <see cref="IKeywordHybridSearchable{TRecord}.HybridSearchAsync{TInput}(TInput, System.Collections.Generic.ICollection{string}, int, Microsoft.Extensions.VectorData.HybridSearchOptions{TRecord}?, System.Threading.CancellationToken)"/> checks if there is a vector property to use by default, and
36/// If this property isn't set, <see cref="IKeywordHybridSearchable{TRecord}.HybridSearchAsync{TInput}(TInput, System.Collections.Generic.ICollection{string}, int, Microsoft.Extensions.VectorData.HybridSearchOptions{TRecord}?, System.Threading.CancellationToken)"/> checks if there is a text property with full text indexing enabled, and
Microsoft.Extensions.VectorData.ConformanceTests (1)
Microsoft.Gen.BuildMetadata (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (16)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (16)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Gen.ContextualOptions.Unit.Tests (16)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Gen.Logging (2)
Microsoft.Gen.Logging.Unit.Tests (16)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Gen.MetadataExtractor (2)
Microsoft.Gen.MetadataExtractor.Unit.Tests (16)
Microsoft.Gen.Metrics (2)
Microsoft.Gen.Metrics.Unit.Tests (16)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Gen.MetricsReports (1)
Microsoft.Gen.MetricsReports.Unit.Tests (16)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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;
Microsoft.Interop.SourceGeneration (8)
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)
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
Microsoft.Maui.Controls.Build.Tasks (4)
Microsoft.ML.AutoML (15)
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)
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)
Microsoft.ML.Fairlearn (1)
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);
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)
Microsoft.ML.TorchSharp (3)
Microsoft.NET.Build.Extensions.Tasks (2)
Microsoft.NET.Build.Tasks (4)
Microsoft.Net.Http.Headers (13)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (3)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
Microsoft.NET.Sdk.WorkloadManifestReader (2)
Microsoft.Private.Windows.Core (1)
Microsoft.TemplateEngine.Core (2)
Microsoft.TestPlatform.CommunicationUtilities (54)
Microsoft.TestPlatform.CrossPlatEngine (50)
Microsoft.TestPlatform.Utilities (2)
Microsoft.VisualStudio.TestPlatform.Client (2)
Microsoft.VisualStudio.TestPlatform.Common (9)
Microsoft.VisualStudio.TestPlatform.ObjectModel (13)
Mono.Cecil (3)
MSBuild (22)
MSBuild.Coordinator (1)
mscorlib (1)
netstandard (1)
NuGet.Build.Tasks.Console (3)
NuGet.Build.Tasks.Pack (1)
NuGet.CommandLine.XPlat (5)
NuGet.Commands (11)
NuGet.Common (2)
NuGet.Configuration (5)
NuGet.DependencyResolver.Core (2)
NuGet.Frameworks (1)
NuGet.LibraryModel (5)
NuGet.PackageManagement (10)
NuGet.Packaging (24)
NuGet.ProjectModel (5)
NuGet.Protocol (6)
NuGet.Resolver (1)
NuGet.Versioning (5)
PresentationCore (131)
PresentationFramework (44)
MS\Internal\Annotations\ObservableDictionary.cs (10)
151void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair)
153((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair);
162bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair)
164return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair);
173bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair)
175return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair);
185void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex)
191((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex);
277public ICollection<string> Keys
289public ICollection<string> Values
PresentationUI (4)
ReachFramework (13)
RepoTasks (2)
Roslyn.Diagnostics.Analyzers (131)
src\roslyn\src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (8)
15public static void RemoveRange<T>(this ICollection<T> collection, IEnumerable<T>? items)
26public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : struct
32public static void AddIfNotNull<T>(this ICollection<T> collection, T? value) where T : class
38public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T>? values)
49public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
58public static void AddRange<T>(this ICollection<T> collection, HashSet<T>? values)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
76public static void AddRange<T>(this ICollection<T> collection, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (8)
98ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
100ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
359void ICollection<KeyValuePair<TKey, TValue>>.Clear()
362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (17)
140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
234ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
240ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1341bool ICollection<TKey>.IsReadOnly => true;
1343void ICollection<TKey>.Add(TKey item)
1346void ICollection<TKey>.Clear()
1352bool ICollection<TKey>.Remove(TKey item)
1549bool ICollection<TValue>.IsReadOnly => true;
1551void ICollection<TValue>.Add(TValue item)
1554bool ICollection<TValue>.Remove(TValue item)
1560void ICollection<TValue>.Clear()
1563bool ICollection<TValue>.Contains(TValue item)
Shared (18)
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;
Shared.Tests (10)
System.Collections (58)
System\Collections\Generic\OrderedDictionary.cs (19)
195this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
240bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
261ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
273ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
1191void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value);
1194bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
1204void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
1221bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
1303((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index);
1371((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair);
1480bool ICollection<TKey>.IsReadOnly => true;
1602void ICollection<TKey>.Add(TKey item) => throw new NotSupportedException();
1605void ICollection<TKey>.Clear() => throw new NotSupportedException();
1611bool ICollection<TKey>.Remove(TKey item) => throw new NotSupportedException();
1675bool ICollection<TValue>.IsReadOnly => true;
1733bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item);
1763void ICollection<TValue>.Add(TValue item) => throw new NotSupportedException();
1766void ICollection<TValue>.Clear() => throw new NotSupportedException();
1772bool ICollection<TValue>.Remove(TValue item) => throw new NotSupportedException();
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.Immutable (179)
System\Collections\Frozen\FrozenDictionary.cs (8)
134int capacity = (source as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0;
335ICollection<TKey> IDictionary<TKey, TValue>.Keys =>
356ICollection<TValue> IDictionary<TKey, TValue>.Values =>
461bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
602bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) =>
652void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
661bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
667void ICollection<KeyValuePair<TKey, TValue>>.Clear() => throw new NotSupportedException();
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (32)
133/// Gets the number of elements contained in the <see cref="ICollection{T}"/>.
135/// <returns>The number of elements contained in the <see cref="ICollection{T}"/>.</returns>
142/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
144/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.</returns>
145bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
165/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
167/// <returns>An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
168ICollection<TKey> IDictionary<TKey, TValue>.Keys
188/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
190/// <returns>An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
191ICollection<TValue> IDictionary<TKey, TValue>.Values
210/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
212/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
220/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
223/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
231/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
234/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
591/// Adds an item to the <see cref="ICollection{T}"/>.
593/// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param>
594/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
601/// Removes all items from the <see cref="ICollection{T}"/>.
603/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only. </exception>
611/// Determines whether the <see cref="ICollection{T}"/> contains a specific value.
613/// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param>
615/// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false.
623/// See the <see cref="ICollection{T}"/> interface.
625void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
640/// Removes the first occurrence of a specific object from the <see cref="ICollection{T}"/>.
642/// <param name="item">The object to remove from the <see cref="ICollection{T}"/>.</param>
644/// 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}"/>.
646/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
System\Collections\Immutable\ImmutableDictionary_2.cs (13)
218ICollection<TKey> IDictionary<TKey, TValue>.Keys
226ICollection<TValue> IDictionary<TKey, TValue>.Values
271bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
601void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
606void ICollection<KeyValuePair<TKey, TValue>>.Clear()
611bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
616void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
642/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
644/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
652/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
655/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
663/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
666/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (10)
82ICollection<TKey> IDictionary<TKey, TValue>.Keys
98ICollection<TValue> IDictionary<TKey, TValue>.Values
123bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
221/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
223/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
231/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
234/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
242/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
245/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
494void 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.CommandLine (5)
System.ComponentModel.Annotations (10)
System\ComponentModel\DataAnnotations\Validator.cs (9)
52ICollection<ValidationResult>? validationResults)
98object instance, ValidationContext validationContext, ICollection<ValidationResult>? validationResults) =>
136ICollection<ValidationResult>? validationResults, bool validateAllProperties)
188ICollection<ValidationResult>? validationResults, IEnumerable<ValidationAttribute> validationAttributes)
357ICollection<ValidationResult>? validationResults,
386/// <see cref="TryValidateObjectAsync(object, ValidationContext, ICollection{ValidationResult}?, bool, CancellationToken)" />
403ICollection<ValidationResult>? validationResults,
449ICollection<ValidationResult>? validationResults,
494ICollection<ValidationResult>? validationResults,
System.ComponentModel.Composition (15)
System.Composition.Convention (1)
System.Composition.Hosting (3)
System.Composition.TypedParts (6)
System.Configuration.ConfigurationManager (11)
System.Data.Common (2)
System.Data.OleDb (5)
System.Diagnostics.DiagnosticSource (3)
System.Diagnostics.EventLog (1)
System.Diagnostics.Process (2)
System.Linq (58)
System\Linq\Lookup.cs (6)
284void ICollection<IGrouping<TKey, TElement>>.CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex)
306bool ICollection<IGrouping<TKey, TElement>>.Contains(IGrouping<TKey, TElement> item)
312bool ICollection<IGrouping<TKey, TElement>>.IsReadOnly => true;
313void ICollection<IGrouping<TKey, TElement>>.Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
314void ICollection<IGrouping<TKey, TElement>>.Clear() => throw new NotSupportedException();
315bool ICollection<IGrouping<TKey, TElement>>.Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
System.Linq.AsyncEnumerable (7)
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.Linq.Parallel (8)
System.Net.Http (23)
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.NameResolution (2)
System.Net.Primitives (1)
System.Net.Security (2)
System.ObjectModel (2)
System.Private.CoreLib (96)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (14)
288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count),
736/// Copies the elements of the <see cref="ICollection{T}"/> to an array of type <see cref="KeyValuePair{TKey,TValue}"/>,
751void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1571public ICollection<TKey> Keys => GetKeys();
1580public ICollection<TValue> Values => GetValues();
1589/// Adds the specified value to the <see cref="ICollection{TValue}"/>
1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
1605/// Determines whether the <see cref="ICollection{T}"/>
1610/// cref="ICollection{TValue}"/>.</param>
1612/// cref="ICollection{T}"/>; otherwise, false.</returns>
1613bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) =>
1620/// <value>true if the <see cref="ICollection{T}"/> is
1624bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
1637bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) =>
src\runtime\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)
1566bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
1568void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) =>
2037bool ICollection<TKey>.IsReadOnly => true;
2039void ICollection<TKey>.Add(TKey item) =>
2042void ICollection<TKey>.Clear() =>
2048bool ICollection<TKey>.Remove(TKey item)
2232bool ICollection<TValue>.IsReadOnly => true;
2234void ICollection<TValue>.Add(TValue item) =>
2237bool ICollection<TValue>.Remove(TValue item)
2243void ICollection<TValue>.Clear() =>
2246bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item);
src\runtime\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)
System.Private.DataContractSerialization (15)
System.Private.Windows.Core (1)
System.Private.Xml (12)
System.Private.Xml.Linq (1)
System.Runtime (1)
System.Runtime.Serialization.Schema (12)
System.Security.Cryptography (1)
System.Security.Cryptography.Cose (3)
System.Security.Cryptography.Pkcs (1)
System.Security.Principal.Windows (1)
System.ServiceModel.Federation (1)
System.ServiceModel.NetFramingBase (4)
System.ServiceModel.Primitives (39)
System.Speech (8)
Result\SemanticValue.cs (8)
112void ICollection<KeyValuePair<string, SemanticValue>>.Add(KeyValuePair<string, SemanticValue> key)
122void ICollection<KeyValuePair<string, SemanticValue>>.Clear()
127bool ICollection<KeyValuePair<string, SemanticValue>>.Remove(KeyValuePair<string, SemanticValue> key)
136void ICollection<KeyValuePair<string, SemanticValue>>.CopyTo(KeyValuePair<string, SemanticValue>[] array, int index)
138((ICollection<KeyValuePair<string, SemanticValue>>)_dictionary).CopyTo(array, index);
145bool ICollection<KeyValuePair<string, SemanticValue>>.IsReadOnly
150ICollection<string> IDictionary<string, SemanticValue>.Keys
155ICollection<SemanticValue> IDictionary<string, SemanticValue>.Values
System.Text.Json (18)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (6)
161bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) =>
181void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) =>
201bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key);
206ICollection<string> IDictionary<string, JsonNode?>.Keys => Dictionary.Keys;
211ICollection<JsonNode?> IDictionary<string, JsonNode?>.Values => Dictionary.Values;
237bool ICollection<KeyValuePair<string, JsonNode?>>.IsReadOnly => false;
System.Text.Json.SourceGeneration (5)
System.Text.RegularExpressions (17)
System.Threading.Tasks.Dataflow (1)
System.Windows.Forms (1)
System.Windows.Forms.Design (10)
System.Windows.Forms.Primitives (1)
System.Xaml (45)
System\Xaml\NameScopeDictionary.cs (9)
244int ICollection<KeyValuePair<string, object>>.Count
252bool ICollection<KeyValuePair<string, object>>.IsReadOnly
260void ICollection<KeyValuePair<string, object>>.Clear()
265void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
270bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
275void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
280bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
320ICollection<string> IDictionary<string, object>.Keys
328ICollection<object> IDictionary<string, object>.Values