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)
157 implementations of ICollection
Aspire.Dashboard (1)
Aspire.Hosting (1)
dotnet-svcutil-lib (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.Build (6)
Microsoft.Build.Framework (6)
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Utilities.Core (1)
Microsoft.CodeAnalysis (13)
Microsoft.CodeAnalysis.CodeStyle (11)
Microsoft.CodeAnalysis.Collections.Package (7)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.PooledObjects.Package (1)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (11)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Http.Diagnostics (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)
MSBuild (1)
MSBuildTaskHost (1)
PresentationCore (6)
PresentationFramework (5)
Shared (1)
Shared.Tests (1)
System.Collections (4)
System.Collections.Immutable (4)
System.ComponentModel.Composition (3)
System.DirectoryServices.AccountManagement (2)
System.Linq (2)
System\Linq\Lookup.cs (2)
262internal sealed class CollectionLookup<TKey, TElement> : Lookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
302internal sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
System.Linq.Expressions (2)
System.Net.Http (2)
System.Net.HttpListener (1)
System.Net.NetworkInformation (4)
System.Net.Primitives (2)
System.Private.CoreLib (5)
System.Security.Principal.Windows (1)
System.ServiceModel.Primitives (1)
System.Speech (1)
System.Windows.Forms (1)
System.Windows.Forms.Primitives (1)
System.Xaml.Tests (4)
3754 references to ICollection
Aspire.Dashboard (2)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (2)
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)
HtmlGenerationWebSite (1)
Identity.DefaultUI.WebSite (5)
IdentitySample.Mvc (2)
illink (3)
InMemory.FunctionalTests (7)
Microsoft.Analyzers.Extra (3)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.Arcade.Test.Common (3)
Microsoft.AspNetCore (5)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.AsyncState (1)
Microsoft.AspNetCore.Authentication.Core.Test (4)
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.OAuth (5)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (15)
OpenIdConnect\TestSettings.cs (15)
167ICollection<string> errors,
216private void ValidateExpectedAuthority(string absoluteUri, ICollection<string> errors, OpenIdConnectRequestType requestType)
238private void ValidateClientId(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
241private void ValidateResponseType(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
244private void ValidateResponseMode(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
247private void ValidateScope(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
250private void ValidateRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
253private void ValidateResource(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
256private void ValidateState(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
259private static void ValidateSkuTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors)
267private void ValidateVersionTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
270private void ValidatePostLogoutRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
273private void ValidateMaxAge(IDictionary<string, string> actualQuery, ICollection<string> errors, bool htmlEncoded)
287private void ValidatePrompt(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
294ICollection<string> errors,
Microsoft.AspNetCore.Authentication.WsFederation (3)
Microsoft.AspNetCore.Components (7)
Microsoft.AspNetCore.Components.Endpoints (9)
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Components.Web.Tests (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.Tests (16)
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.Grpc.JsonTranscoding.Tests (1)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Hosting (10)
Microsoft.AspNetCore.Hosting.Server.Abstractions (2)
Microsoft.AspNetCore.Hosting.Tests (4)
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\Shared\Dictionary\AdaptiveCapacityDictionary.cs (11)
150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
153public ICollection<TKey> Keys
178public ICollection<TValue> Values
203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item);
264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item);
291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(
314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex);
346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item);
Microsoft.AspNetCore.Http.Abstractions (7)
Microsoft.AspNetCore.Http.Abstractions.Tests (22)
RouteValueDictionaryTests.cs (21)
432var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly;
734var keys = dict.Keys;
748var keys = dict.Keys;
765var keys = dict.Keys;
779var values = dict.Values;
793var values = dict.Values;
810var values = dict.Values;
941((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value"));
1024var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1043var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1062var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1082var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1098var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1118var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1138var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1159var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
1304((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1);
1329var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
1349var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
1369var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
1390var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
Microsoft.AspNetCore.Http.Extensions (8)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Features (10)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.Http.Tests (2)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (5)
Microsoft.AspNetCore.Identity.InMemory.Test (5)
Microsoft.AspNetCore.Identity.Test (5)
Microsoft.AspNetCore.JsonPatch.Tests (4)
Microsoft.AspNetCore.Mvc.Abstractions (4)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (18)
Microsoft.AspNetCore.Mvc.Core (37)
Microsoft.AspNetCore.Mvc.Core.Test (26)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (60)
DictionaryModelBinderIntegrationTest.cs (18)
1533int ICollection<KeyValuePair<string, string>>.Count
1541bool ICollection<KeyValuePair<string, string>>.IsReadOnly
1549ICollection<string> IDictionary<string, string>.Keys
1557ICollection<string> IDictionary<string, string>.Values
1565void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> item)
1575void ICollection<KeyValuePair<string, string>>.Clear()
1580bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> item)
1590void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
1605bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> item)
1638int ICollection<KeyValuePair<TKey, TValue>>.Count
1646bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
1654ICollection<TKey> IDictionary<TKey, TValue>.Keys
1662ICollection<TValue> IDictionary<TKey, TValue>.Values
1670void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
1680void ICollection<KeyValuePair<TKey, TValue>>.Clear()
1685bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
1695void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
1710bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Microsoft.AspNetCore.Mvc.TagHelpers (4)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
OptionTagHelperTest.cs (6)
13public static TheoryData<string, string, string, ICollection<string>, TagHelperOutput> GeneratesExpectedDataSet
17return new TheoryData<string, string, string, ICollection<string>, TagHelperOutput>
358entry => (entry[1] != null || entry[3] == null || ((ICollection<string>)(entry[3])).Count == 0));
379ICollection<string> currentValues,
451ICollection<string> currentValues,
515ICollection<string> _,
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
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.Mvc.ViewFeatures.Test (17)
Microsoft.AspNetCore.OpenApi.Tests (3)
Microsoft.AspNetCore.Owin (27)
DictionaryStringArrayWrapper.cs (9)
32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count;
34bool ICollection<KeyValuePair<string, string[]>>.IsReadOnly => Inner.IsReadOnly;
36ICollection<string> IDictionary<string, string[]>.Keys => Inner.Keys;
38ICollection<string[]> IDictionary<string, string[]>.Values => Inner.Values.Select(Convert).ToList();
40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item));
44void ICollection<KeyValuePair<string, string[]>>.Clear() => Inner.Clear();
46bool ICollection<KeyValuePair<string, string[]>>.Contains(KeyValuePair<string, string[]> item) => Inner.Contains(Convert(item));
50void ICollection<KeyValuePair<string, string[]>>.CopyTo(KeyValuePair<string, string[]>[] array, int arrayIndex)
62bool ICollection<KeyValuePair<string, string[]>>.Remove(KeyValuePair<string, string[]> item) => Inner.Remove(Convert(item));
DictionaryStringValuesWrapper.cs (9)
77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count;
79bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => Inner.IsReadOnly;
81ICollection<string> IDictionary<string, StringValues>.Keys => Inner.Keys;
83ICollection<StringValues> IDictionary<string, StringValues>.Values => Inner.Values.Select(Convert).ToList();
85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item));
89void ICollection<KeyValuePair<string, StringValues>>.Clear() => Inner.Clear();
91bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) => Inner.Contains(Convert(item));
95void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
107bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item));
OwinEnvironment.cs (9)
158ICollection<string> IDictionary<string, object>.Keys
186ICollection<object> IDictionary<string, object>.Values
239void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
244void ICollection<KeyValuePair<string, object>>.Clear()
250bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
255void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
271int ICollection<KeyValuePair<string, object>>.Count
276bool ICollection<KeyValuePair<string, object>>.IsReadOnly
281bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Owin.Tests (2)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.Razor.Runtime (6)
Microsoft.AspNetCore.Razor.Test (2)
Microsoft.AspNetCore.Routing (13)
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Microsoft.AspNetCore.Server.HttpSys (12)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (8)
89public ICollection<string> Keys
110ICollection<StringValues> IDictionary<string, StringValues>.Values
145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
150void ICollection<KeyValuePair<string, StringValues>>.Clear()
159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item)
164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly
239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (2)
Microsoft.AspNetCore.Server.IIS (11)
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.Server.Kestrel.Core.Tests (5)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Session (4)
Microsoft.AspNetCore.Shared.Tests (61)
AdaptiveCapacityDictionaryTests.cs (15)
94var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly;
293var keys = dict.Keys;
310var keys = dict.Keys;
324var values = dict.Values;
341var values = dict.Values;
447((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value"));
500var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
519var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
538var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
558var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input);
654((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1);
679var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
699var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
719var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
740var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input);
ClosedGenericMatcherTest.cs (18)
39typeof(ICollection<BaseClass>),
66typeof(ICollection<>),
67typeof(ICollection<KeyValuePair<string, object>>)
82typeof(ICollection<>),
83typeof(ICollection<KeyValuePair<string, object>>)
98typeof(ICollection<>),
99typeof(ICollection<KeyValuePair<string, object>>)
109typeof(ICollection<>),
110typeof(ICollection<BaseClass>)
251int ICollection<KeyValuePair<string, object>>.Count
259bool ICollection<KeyValuePair<string, object>>.IsReadOnly
267ICollection<string> IDictionary<string, object>.Keys
275ICollection<object> IDictionary<string, object>.Values
288void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
298void ICollection<KeyValuePair<string, object>>.Clear()
303bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
313void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
328bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (11)
150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
153public ICollection<TKey> Keys
178public ICollection<TValue> Values
203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item);
264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item);
291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(
314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex);
346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (8)
89public ICollection<string> Keys
110ICollection<StringValues> IDictionary<string, StringValues>.Values
145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
150void ICollection<KeyValuePair<string, StringValues>>.Clear()
159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item)
164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly
239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.Tests (3)
Microsoft.Build (292)
Collections\CopyOnWritePropertyDictionary.cs (7)
68ICollection<string> IDictionary<string, T>.Keys => ((IDictionary<string, T>)_backing).Keys;
73ICollection<T> IDictionary<string, T>.Values => ((IDictionary<string, T>)_backing).Values;
78bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false;
272void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
280bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item)
293void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex)
301bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
Collections\PropertyDictionary.cs (14)
109ICollection<string> IDictionary<string, T>.Keys
124ICollection<T> IDictionary<string, T>.Values
139int ICollection<KeyValuePair<string, T>>.Count => Count;
145bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false;
156return ((ICollection<T>)_properties).Count;
232((ICollection<T>)_properties).Clear();
395void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
403void ICollection<KeyValuePair<string, T>>.Clear()
411bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item)
427void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex)
435bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
522var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default);
537foreach (var kvp in (ICollection<T>)_properties)
557foreach (T property in (ICollection<T>)_properties)
Graph\GraphBuildRequestData.cs (14)
32public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild)
43public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices)
55public GraphBuildRequestData(ProjectGraph projectGraph, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
70public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices)
83public GraphBuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
93public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild)
104public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices)
116public GraphBuildRequestData(ProjectGraphEntryPoint projectGraphEntryPoint, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
126public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild)
137public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices)
149public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags)
157public GraphBuildRequestData(IEnumerable<ProjectGraphEntryPoint> projectGraphEntryPoints, ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions graphBuildOptions)
168private GraphBuildRequestData(ICollection<string> targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, GraphBuildOptions? graphBuildOptions = null)
245public new ICollection<string> TargetNames => base.TargetNames;
Microsoft.Build.Engine.OM.UnitTests (61)
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (8)
129public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<CT, bool> matcher, int expectedCount)
132var result = QueryChildrenWithValidation(matcher);
137public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<T, IEnumerable> getter, Func<CT, bool> matcher, int expectedCount)
140var result = QueryChildrenWithValidation(getter, matcher);
145public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<T, IEnumerable> getter, Func<CT, bool> matcher)
184public ICollection<ElementLinkPair<CT>> QueryChildrenWithValidation<CT>(Func<CT, bool> matcher)
196var result = QueryChildrenWithValidation(matcher, 1);
203var result = QueryChildrenWithValidation(getter, matcher, 1);
Microsoft.Build.Engine.UnitTests (113)
Microsoft.Build.Framework (82)
ImmutableSegmentedDictionary`2.cs (9)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
168ICollection<KeyValuePair<TKey, TValue>> collectionToCheck = dictionary ?? self._dictionary;
348void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
349=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
363void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
366void ICollection<KeyValuePair<TKey, TValue>>.Clear()
369bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
SegmentedDictionary`2.cs (18)
144: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
169ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
175ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
205void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
208bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
219bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
840bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
842void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1303bool ICollection<TKey>.IsReadOnly => true;
1305void ICollection<TKey>.Add(TKey item)
1308void ICollection<TKey>.Clear()
1311bool ICollection<TKey>.Contains(TKey item)
1314bool ICollection<TKey>.Remove(TKey item)
1503bool ICollection<TValue>.IsReadOnly => true;
1505void ICollection<TValue>.Add(TValue item)
1508bool ICollection<TValue>.Remove(TValue item)
1514void ICollection<TValue>.Clear()
1517bool ICollection<TValue>.Contains(TValue item)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (9)
Microsoft.Build.Tasks.Core (20)
Microsoft.Build.Tasks.UnitTests (3)
Microsoft.Build.UnitTests.Shared (3)
Microsoft.Build.Utilities.Core (10)
Microsoft.Cci.Extensions (14)
Microsoft.CodeAnalysis (141)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1339bool ICollection<TKey>.IsReadOnly => true;
1341void ICollection<TKey>.Add(TKey item)
1344void ICollection<TKey>.Clear()
1350bool ICollection<TKey>.Remove(TKey item)
1547bool ICollection<TValue>.IsReadOnly => true;
1549void ICollection<TValue>.Add(TValue item)
1552bool ICollection<TValue>.Remove(TValue item)
1558void ICollection<TValue>.Clear()
1561bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.CodeStyle (131)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1339bool ICollection<TKey>.IsReadOnly => true;
1341void ICollection<TKey>.Add(TKey item)
1344void ICollection<TKey>.Clear()
1350bool ICollection<TKey>.Remove(TKey item)
1547bool ICollection<TValue>.IsReadOnly => true;
1549void ICollection<TValue>.Add(TValue item)
1552bool ICollection<TValue>.Remove(TValue item)
1558void ICollection<TValue>.Clear()
1561bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.Collections.Package (99)
ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1339bool ICollection<TKey>.IsReadOnly => true;
1341void ICollection<TKey>.Add(TKey item)
1344void ICollection<TKey>.Clear()
1350bool ICollection<TKey>.Remove(TKey item)
1547bool ICollection<TValue>.IsReadOnly => true;
1549void ICollection<TValue>.Add(TValue item)
1552bool ICollection<TValue>.Remove(TValue item)
1558void ICollection<TValue>.Clear()
1561bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.CSharp (43)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
53nameof(ICollection<int>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
53nameof(ICollection<int>),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.Features (10)
Microsoft.CodeAnalysis.LanguageServer (2)
Microsoft.CodeAnalysis.UnitTests (85)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (127)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1339bool ICollection<TKey>.IsReadOnly => true;
1341void ICollection<TKey>.Add(TKey item)
1344void ICollection<TKey>.Clear()
1350bool ICollection<TKey>.Remove(TKey item)
1547bool ICollection<TValue>.IsReadOnly => true;
1549void ICollection<TValue>.Add(TValue item)
1552bool ICollection<TValue>.Remove(TValue item)
1558void ICollection<TValue>.Clear()
1561bool ICollection<TValue>.Contains(TValue item)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (120)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (8)
96ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
98ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
src\Dependencies\Collections\SegmentedDictionary`2.cs (17)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
232ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
238ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1339bool ICollection<TKey>.IsReadOnly => true;
1341void ICollection<TKey>.Add(TKey item)
1344void ICollection<TKey>.Clear()
1350bool ICollection<TKey>.Remove(TKey item)
1547bool ICollection<TValue>.IsReadOnly => true;
1549void ICollection<TValue>.Add(TValue item)
1552bool ICollection<TValue>.Remove(TValue item)
1558void ICollection<TValue>.Clear()
1561bool ICollection<TValue>.Contains(TValue item)
Microsoft.CSharp (2)
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.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.SignCheckLibrary (3)
Microsoft.Extensions.AI (17)
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 (29)
AdditionalPropertiesDictionary{TValue}.cs (11)
71public ICollection<string> Keys => _dictionary.Keys;
74public ICollection<TValue> Values => _dictionary.Values;
80bool ICollection<KeyValuePair<string, TValue>>.IsReadOnly => false;
111void ICollection<KeyValuePair<string, TValue>>.Add(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Add(item);
117bool ICollection<KeyValuePair<string, TValue>>.Contains(KeyValuePair<string, TValue> item) =>
118((ICollection<KeyValuePair<string, TValue>>)_dictionary).Contains(item);
124void ICollection<KeyValuePair<string, TValue>>.CopyTo(KeyValuePair<string, TValue>[] array, int arrayIndex) =>
125((ICollection<KeyValuePair<string, TValue>>)_dictionary).CopyTo(array, arrayIndex);
143bool ICollection<KeyValuePair<string, TValue>>.Remove(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Remove(item);
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.AzureAIInference (17)
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.Integration.Tests (1)
Microsoft.Extensions.AI.Ollama (17)
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.OpenAI (17)
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.Tests (1)
Microsoft.Extensions.AmbientMetadata.Application (1)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.Caching.Abstractions (4)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.Memory (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.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.Probes (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http.Diagnostics (16)
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.Telemetry (2)
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (16)
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)
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)
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)
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)
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.Http.Headers (13)
MSBuild (17)
MSBuildTaskHost (28)
mscorlib (1)
netstandard (1)
PresentationCore (131)
PresentationFramework (44)
MS\Internal\Annotations\ObservableDictionary.cs (10)
152void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair)
154((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair);
163bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair)
165return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair);
174bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair)
176return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair);
186void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex)
192((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex);
278public ICollection<string> Keys
290public ICollection<string> Values
PresentationUI (4)
ReachFramework (13)
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)
Sockets.BindTests (3)
StartRequestDelegateUrlApp (1)
StartRouteBuilderUrlApp (1)
StartWithIApplicationBuilderUrlApp (1)
System.Collections (58)
System\Collections\Generic\OrderedDictionary.cs (19)
201this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
246bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
267ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
279ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
1188void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value);
1191bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
1201void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
1218bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) =>
1299((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index);
1367((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair);
1476bool ICollection<TKey>.IsReadOnly => true;
1598void ICollection<TKey>.Add(TKey item) => throw new NotSupportedException();
1601void ICollection<TKey>.Clear() => throw new NotSupportedException();
1607bool ICollection<TKey>.Remove(TKey item) => throw new NotSupportedException();
1671bool ICollection<TValue>.IsReadOnly => true;
1729bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item);
1759void ICollection<TValue>.Add(TValue item) => throw new NotSupportedException();
1762void ICollection<TValue>.Clear() => throw new NotSupportedException();
1768bool ICollection<TValue>.Remove(TValue item) => throw new NotSupportedException();
System\Collections\Generic\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.Concurrent (14)
System\Collections\Concurrent\ConcurrentDictionary.cs (14)
288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count),
736/// Copies the elements of the <see cref="ICollection{T}"/> to an array of type <see cref="KeyValuePair{TKey,TValue}"/>,
751void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
1596public ICollection<TKey> Keys => GetKeys();
1605public ICollection<TValue> Values => GetValues();
1614/// Adds the specified value to the <see cref="ICollection{TValue}"/>
1627void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
1630/// Determines whether the <see cref="ICollection{T}"/>
1635/// cref="ICollection{TValue}"/>.</param>
1637/// cref="ICollection{T}"/>; otherwise, false.</returns>
1638bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) =>
1645/// <value>true if the <see cref="ICollection{T}"/> is
1649bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
1662bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) =>
System.Collections.Immutable (175)
System\Collections\Frozen\FrozenDictionary.cs (7)
289ICollection<TKey> IDictionary<TKey, TValue>.Keys =>
310ICollection<TValue> IDictionary<TKey, TValue>.Values =>
415bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
556bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) =>
606void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
615bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
621void ICollection<KeyValuePair<TKey, TValue>>.Clear() => throw new NotSupportedException();
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (32)
137/// Gets the number of elements contained in the <see cref="ICollection{T}"/>.
139/// <returns>The number of elements contained in the <see cref="ICollection{T}"/>.</returns>
146/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
148/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.</returns>
149bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
169/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
171/// <returns>An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
172ICollection<TKey> IDictionary<TKey, TValue>.Keys
192/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
194/// <returns>An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
195ICollection<TValue> IDictionary<TKey, TValue>.Values
214/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
216/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
224/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
227/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
235/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
238/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
605/// Adds an item to the <see cref="ICollection{T}"/>.
607/// <param name="item">The object to add to the <see cref="ICollection{T}"/>.</param>
608/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
615/// Removes all items from the <see cref="ICollection{T}"/>.
617/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only. </exception>
625/// Determines whether the <see cref="ICollection{T}"/> contains a specific value.
627/// <param name="item">The object to locate in the <see cref="ICollection{T}"/>.</param>
629/// true if <paramref name="item"/> is found in the <see cref="ICollection{T}"/>; otherwise, false.
637/// See the <see cref="ICollection{T}"/> interface.
639void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
654/// Removes the first occurrence of a specific object from the <see cref="ICollection{T}"/>.
656/// <param name="item">The object to remove from the <see cref="ICollection{T}"/>.</param>
658/// true if <paramref name="item"/> was successfully removed from the <see cref="ICollection{T}"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="ICollection{T}"/>.
660/// <exception cref="NotSupportedException">The <see cref="ICollection{T}"/> is read-only.</exception>
System\Collections\Immutable\ImmutableDictionary_2.cs (13)
216ICollection<TKey> IDictionary<TKey, TValue>.Keys
224ICollection<TValue> IDictionary<TKey, TValue>.Values
269bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
594void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
599void ICollection<KeyValuePair<TKey, TValue>>.Clear()
604bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
609void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
635/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
637/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
645/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
648/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
656/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
659/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (10)
86ICollection<TKey> IDictionary<TKey, TValue>.Keys
102ICollection<TValue> IDictionary<TKey, TValue>.Values
127bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
225/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
227/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
235/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
238/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
246/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
249/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
508void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (13)
144ICollection<TKey> IDictionary<TKey, TValue>.Keys
152ICollection<TValue> IDictionary<TKey, TValue>.Values
161bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
506void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
511void ICollection<KeyValuePair<TKey, TValue>>.Clear()
516bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
521void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
547/// Gets a value indicating whether the <see cref="ICollection{T}"/> is read-only.
549/// <returns>true if the <see cref="ICollection{T}"/> is read-only; otherwise, false.
557/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
560/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
568/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
571/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System.ComponentModel.Annotations (4)
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.Diagnostics.DiagnosticSource (4)
System.Diagnostics.Process (2)
System.Linq (58)
System\Linq\Lookup.cs (6)
266void ICollection<IGrouping<TKey, TElement>>.CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex)
288bool ICollection<IGrouping<TKey, TElement>>.Contains(IGrouping<TKey, TElement> item)
294bool ICollection<IGrouping<TKey, TElement>>.IsReadOnly => true;
295void ICollection<IGrouping<TKey, TElement>>.Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
296void ICollection<IGrouping<TKey, TElement>>.Clear() => throw new NotSupportedException();
297bool ICollection<IGrouping<TKey, TElement>>.Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
System.Linq.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 (24)
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 (83)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (17)
101this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
218ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
224ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
254void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) =>
257bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
268bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
1457bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
1459void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) =>
1928bool ICollection<TKey>.IsReadOnly => true;
1930void ICollection<TKey>.Add(TKey item) =>
1933void ICollection<TKey>.Clear() =>
1939bool ICollection<TKey>.Remove(TKey item)
2123bool ICollection<TValue>.IsReadOnly => true;
2125void ICollection<TValue>.Add(TValue item) =>
2128bool ICollection<TValue>.Remove(TValue item)
2134void ICollection<TValue>.Clear() =>
2137bool ICollection<TValue>.Contains(TValue item) => _dictionary.ContainsValue(item);
src\libraries\System.Private.CoreLib\src\System\Collections\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 (14)
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 (11)
netstandard.cs (11)
37bool ICollection<T>.IsReadOnly { get { return default; } }
1730public System.Collections.Generic.ICollection<string> Keys { get { return default; } }
1731bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.IsReadOnly { get { return default; } }
1733public System.Collections.Generic.ICollection<object> Values { get { return default; } }
1741void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Add(System.Collections.Generic.KeyValuePair<string, object> pair) { }
1742bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Contains(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; }
1743void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.CopyTo(System.Collections.Generic.KeyValuePair<string, object>[] array, int index) { }
1744bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Remove(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; }
2146public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.IParameterInspector> ClientParameterInspectors { get { return default; } }
2164public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.IClientMessageInspector> ClientMessageInspectors { get { return default; } }
2166public System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.ClientOperation> ClientOperations { get { return default; } }
System.Speech (7)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (7)
303bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.IsReadOnly { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } }
304System.Collections.Generic.ICollection<string> System.Collections.Generic.IDictionary<System.String,System.Speech.Recognition.SemanticValue>.Keys { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } }
305System.Collections.Generic.ICollection<System.Speech.Recognition.SemanticValue> System.Collections.Generic.IDictionary<System.String,System.Speech.Recognition.SemanticValue>.Values { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } }
311void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Add(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
312void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Clear() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
313void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.CopyTo(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>[] array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
314bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Remove(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (15)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (6)
130bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) =>
150void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) =>
170bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key);
175ICollection<string> IDictionary<string, JsonNode?>.Keys => Dictionary.Keys;
180ICollection<JsonNode?> IDictionary<string, JsonNode?>.Values => Dictionary.Values;
209bool ICollection<KeyValuePair<string, JsonNode?>>.IsReadOnly => false;
System.Text.Json.SourceGeneration (3)
System.Text.RegularExpressions (17)
System.Threading.Tasks.Dataflow (1)
System.Windows.Forms (1)
System.Windows.Forms.Design (10)
System.Windows.Forms.Primitives (1)
System.Windows.Forms.Tests (3)
System.Xaml (45)
System\Xaml\NameScopeDictionary.cs (9)
245int ICollection<KeyValuePair<string, object>>.Count
253bool ICollection<KeyValuePair<string, object>>.IsReadOnly
261void ICollection<KeyValuePair<string, object>>.Clear()
266void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
271bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
276void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
281bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
321ICollection<string> IDictionary<string, object>.Keys
329ICollection<object> IDictionary<string, object>.Values
System.Xaml.Tests (40)
System\Xaml\XamlTypeTests.cs (33)
1750yield return new object?[] { new SubXamlType(typeof(ICollection<int>), new XamlSchemaContext()), XamlCollectionKind.Collection };
3101int ICollection<object>.Count => throw new NotImplementedException();
3103int ICollection<int>.Count => throw new NotImplementedException();
3105bool ICollection<object>.IsReadOnly => throw new NotImplementedException();
3107bool ICollection<int>.IsReadOnly => throw new NotImplementedException();
3109void ICollection<object>.Add(object item) => throw new NotImplementedException();
3111void ICollection<int>.Add(int item) => throw new NotImplementedException();
3113void ICollection<object>.Clear() => throw new NotImplementedException();
3115void ICollection<int>.Clear() => throw new NotImplementedException();
3117bool ICollection<object>.Contains(object item) => throw new NotImplementedException();
3119bool ICollection<int>.Contains(int item) => throw new NotImplementedException();
3121void ICollection<object>.CopyTo(object[] array, int arrayIndex) => throw new NotImplementedException();
3123void ICollection<int>.CopyTo(int[] array, int arrayIndex) => throw new NotImplementedException();
3131bool ICollection<object>.Remove(object item) => throw new NotImplementedException();
3133bool ICollection<int>.Remove(int item) => throw new NotImplementedException();
3142ICollection<string> IDictionary<string, int>.Keys => throw new NotImplementedException();
3144ICollection<int> IDictionary<int, string>.Keys => throw new NotImplementedException();
3146ICollection<int> IDictionary<string, int>.Values => throw new NotImplementedException();
3148ICollection<string> IDictionary<int, string>.Values => throw new NotImplementedException();
3150int ICollection<KeyValuePair<string, int>>.Count => throw new NotImplementedException();
3152int ICollection<KeyValuePair<int, string>>.Count => throw new NotImplementedException();
3154bool ICollection<KeyValuePair<string, int>>.IsReadOnly => throw new NotImplementedException();
3156bool ICollection<KeyValuePair<int, string>>.IsReadOnly => throw new NotImplementedException();
3160void ICollection<KeyValuePair<string, int>>.Add(KeyValuePair<string, int> item) => throw new NotImplementedException();
3164void ICollection<KeyValuePair<int, string>>.Add(KeyValuePair<int, string> item) => throw new NotImplementedException();
3166void ICollection<KeyValuePair<string, int>>.Clear() => throw new NotImplementedException();
3168void ICollection<KeyValuePair<int, string>>.Clear() => throw new NotImplementedException();
3170bool ICollection<KeyValuePair<string, int>>.Contains(KeyValuePair<string, int> item) => throw new NotImplementedException();
3172bool ICollection<KeyValuePair<int, string>>.Contains(KeyValuePair<int, string> item) => throw new NotImplementedException();
3178void ICollection<KeyValuePair<string, int>>.CopyTo(KeyValuePair<string, int>[] array, int arrayIndex) => throw new NotImplementedException();
3180void ICollection<KeyValuePair<int, string>>.CopyTo(KeyValuePair<int, string>[] array, int arrayIndex) => throw new NotImplementedException();
3190bool ICollection<KeyValuePair<string, int>>.Remove(KeyValuePair<string, int> item) => throw new NotImplementedException();
3194bool ICollection<KeyValuePair<int, string>>.Remove(KeyValuePair<int, string> item) => throw new NotImplementedException();
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)
xunit.assert (1)
xunit.console (4)