Implemented interface members:
method
ContainsKey
System.Collections.Generic.IDictionary<TKey, TValue>.ContainsKey(TKey)
method
ContainsKey
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>.ContainsKey(TKey)
1260 references to ContainsKey
Aspire.Hosting (1)
src\Shared\SecretsStore.cs (1)
38public bool ContainsKey(string key) => _secrets.ContainsKey(key);
Aspire.Hosting.Azure (1)
AzureProvisioningResource.cs (1)
79if (distinctInfrastructureParametersLookup.ContainsKey(aspireParameter.Key))
Aspire.Hosting.Azure.Tests (3)
AzureBicepResourceTests.cs (3)
730Assert.True(config.ContainsKey("APPLICATIONINSIGHTS_CONNECTION_STRING")); 779Assert.True(infrastructureParametersLookup.ContainsKey("skuName")); 818Assert.True(infrastructureParametersLookup.ContainsKey("sku"));
Aspire.Hosting.Tests (9)
KestrelConfigTests.cs (2)
44Assert.False(config.ContainsKey("ASPNETCORE_URLS")); 85Assert.False(config.ContainsKey("Kestrel__Endpoints__http__Url"));
ProjectResourceTests.cs (7)
193Assert.True(config.ContainsKey("OTEL_EXPORTER_OTLP_HEADERS"), "Config should have 'OTEL_EXPORTER_OTLP_HEADERS' header and doesn't."); 197Assert.False(config.ContainsKey("OTEL_EXPORTER_OTLP_HEADERS"), "Config shouldn't have 'OTEL_EXPORTER_OTLP_HEADERS' header and does."); 320Assert.False(config.ContainsKey("ASPNETCORE_URLS")); 321Assert.False(config.ContainsKey("ASPNETCORE_HTTPS_PORT")); 385Assert.False(config.ContainsKey("ASPNETCORE_URLS")); 386Assert.False(config.ContainsKey("ASPNETCORE_HTTPS_PORT")); 411Assert.False(config.ContainsKey("ASPNETCORE_HTTPS_PORT"));
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationExtensions.cs (1)
62if (!seenVolumes.Add(name) && !renamedVolumes.ContainsKey(name))
BasicWebSite (1)
ValueProviders\CustomValueProviderFactory.cs (1)
34public bool ContainsPrefix(string prefix) => Values.ContainsKey(prefix);
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
1769return _typeMap.ContainsKey(typeName);
BuildBoss (2)
ProjectCheckerUtil.cs (1)
185if (!_solutionMap.ContainsKey(key))
SolutionCheckerUtil.cs (1)
93if (map.ContainsKey(projectData.Key))
BuildValidator (1)
LocalReferenceResolver.cs (1)
178if (!_mvidMap.ContainsKey(peInfo.Mvid))
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
112if (!_createdTypeSpecs.ContainsKey(typeSymbol))
CSharpSyntaxGenerator (1)
SignatureWriter.cs (1)
132return _typeMap.ContainsKey(typeName);
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (1)
136return _contents.ContainsKey(key.ToLower(CultureInfo.InvariantCulture));
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
275if (_parent._namespaceMappings.ContainsKey(targetNamespace)) 387if (specifiedTypes.ContainsKey(typeArg))
dotnet-svcutil-lib (144)
CodeDomFixup\ArrayOfXElementTypeHelper.cs (2)
71if (!nameTable.ContainsKey(type.Name)) 78while (nameTable.ContainsKey(uniqueName))
CodeDomFixup\CodeDomVisitors\CodeTypeNameScope.cs (1)
27return _nameTable.ContainsKey(key);
CodeDomFixup\CodeDomVisitors\CreateCallbackImpl.cs (1)
234System.Diagnostics.Debug.Assert(!methodNames.ContainsKey(method.Name), $"Key '{method.Name}' already added to dictionary!");
CodeDomFixup\CodeDomVisitors\MakeOldAsyncMethodsPrivate.cs (1)
53if (!_privateIfaceMethods.ContainsKey(method.Name))
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (6)
48if (attr.Name.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(attr.Name)) 52if (attr.Name.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(attr.Name)) 61if (comment.Text.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(comment.Text)) 65if (comment.Text.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(comment.Text)) 74if (typeref.BaseType.Contains(s_microsoftXml) && _xmlTypes.ContainsKey(typeref.BaseType)) 78if (typeref.BaseType.Contains(s_microsoftCodeDom) && _codeDomTypes.ContainsKey(typeref.BaseType))
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
32return _nameTable.ContainsKey(key);
CodeDomFixup\CodeDomVisitors\SpecialIXmlSerializableRemapper.cs (3)
31return _specialIXmlSerializableTypes.ContainsKey(typeref.BaseType); 62&& !_typeDeclCollection.AllTypeDecls.ContainsKey(specialTypeName)) 101System.Diagnostics.Debug.Assert(!_specialIXmlSerializableTypes.ContainsKey(typeName), $"Key '{typeName}' already added to dictionary!");
CodeDomFixup\CodeDomVisitors\TypeDeclCollection.cs (1)
45System.Diagnostics.Debug.Assert(!AllTypeDecls.ContainsKey(fullName), $"Key '{fullName}' already added to dictionary!");
CodeDomFixup\WcfCodeGenerationExtension.cs (1)
111if (importer.State.ContainsKey(typeof(XsdDataContractImporter)))
CommandProcessorOptions.cs (1)
863if (specifiedTypes.ContainsKey(typeArg))
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriter.cs (1)
178_bitsCData.PushBit(_lookupCDataElems.ContainsKey(_qnameCData));
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriterV1.cs (1)
168_bitsCData.PushBit(_lookupCDataElems.ContainsKey(_qnameCData));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (1)
8207if (_currentEntities.ContainsKey(entity))
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (1)
1512Debug.Assert(_nsHashtable.ContainsKey(_nsStack[i].prefix));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (1)
1917Debug.Assert(_nsHashtable.ContainsKey(_nsStack[i].prefix));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNodeReader.cs (3)
1015if (!dict.ContainsKey(string.Empty)) 1023if (!dict.ContainsKey(localName)) 1045if (dict.ContainsKey(string.Empty) && dict[string.Empty] == string.Empty)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (1)
364if (_mappings.ContainsKey(uri))
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (5)
828if (!_schemaInfo.Notations.ContainsKey(notationName)) 1244if (!_schemaInfo.ParameterEntities.ContainsKey(entityName)) 1251if (!_schemaInfo.GeneralEntities.ContainsKey(entityName)) 1295if (!_schemaInfo.Notations.ContainsKey(notationName)) 1330if (!_schemaInfo.Notations.ContainsKey(notationName.Name))
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionCompiler.cs (3)
292if (!schemaInfo.Notations.ContainsKey(no.Name.Name)) 772if (!decl.ProhibitedAttributes.ContainsKey(attribute.QualifiedName)) 779if (!decl.AttDefs.ContainsKey(attribute.QualifiedName) && attribute.AttDef != null && attribute.AttDef.Name != XmlQualifiedName.Empty && attribute.AttDef != SchemaAttDef.Empty)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (9)
194return _targetNamespaces.ContainsKey(ns); 199return _targetNamespaces.ContainsKey(ns); 214if (!_attributeDecls.TryGetValue(qname, out attdef) && _targetNamespaces.ContainsKey(qname.Namespace)) 266else if (ed.ProhibitedAttributes.ContainsKey(qname)) 353if (!_targetNamespaces.ContainsKey(tns)) 361if (!_elementDecls.ContainsKey(entry.Key)) 368if (!_elementDeclsByType.ContainsKey(entry.Key)) 375if (!_attributeDecls.ContainsKey(attdef.Name)) 382if (!Notations.ContainsKey(notation.Name.Name))
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaSetCompiler.cs (3)
160if (!schemaInfo.Notations.ContainsKey(no.Name.Name)) 844if (!decl.ProhibitedAttributes.ContainsKey(attribute.QualifiedName)) 851if (!decl.AttDefs.ContainsKey(attribute.QualifiedName) && attribute.AttDef != null && attribute.AttDef.Name != XmlQualifiedName.Empty && attribute.AttDef != SchemaAttDef.Empty)
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (4)
521if (_SchemaInfo.TargetNamespaces.ContainsKey(uri)) 741if (builder._SchemaInfo.ElementDecls.ContainsKey(qname)) 1060if (!builder._SchemaInfo.AttributeDecls.ContainsKey(qname)) 1193if (!builder._SchemaInfo.ElementDecls.ContainsKey(qname))
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (2)
228if (schemaInfo.TargetNamespaces.ContainsKey(context.Namespace)) 378if (this.schemaInfo.TargetNamespaces.ContainsKey(uri))
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaObjectTable.cs (2)
27Debug.Assert(!_table.ContainsKey(name), "XmlSchemaObjectTable.Add: entry already exists"); 108return _table.ContainsKey(name);
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (2)
156if (!SchemaInfo.TargetNamespaces.ContainsKey(inlineNS)) 639if (SchemaInfo.TargetNamespaces.ContainsKey(uri) && _nsManager.LookupPrefix(uri) != null)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
129System.Diagnostics.Debug.Assert(_argList != null && _argList.ContainsKey(name)); 2672return _locals.ContainsKey(key) || (parent != null && parent.ContainsKey(key));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (2)
107System.Diagnostics.Debug.Assert(_methodBuilders.ContainsKey(methodName)); 572System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3)));
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathDocument.cs (3)
413if (_mapNmsp == null || !_mapNmsp.ContainsKey(nodeRef)) 434if (!_idValueMap.ContainsKey(id)) 445if (_idValueMap == null || !_idValueMap.ContainsKey(id))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (13)
65if (clrNamespace != null && !_clrNamespaces.ContainsKey(clrNamespace)) 111if (!_clrNamespaces.ContainsKey(ns)) 306if (contractNamesInHierarchy.ContainsKey(classContract.StableName)) 763return (string.IsNullOrEmpty(clrNamespace) && _clrNamespaces.ContainsKey(typeName)); 768if (!_clrNamespaces.ContainsKey(typeName)) 944if (handledContracts.ContainsKey(dataContract)) 988if (dataContract.StableName != pair.Key && !dataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract) 1292if (contractCodeDomInfo.GetMemberNames().ContainsKey(memberName)) 1298if (!contractCodeDomInfo.GetMemberNames().ContainsKey(uniqueMemberName)) 1375if (ClrNamespaces.ContainsKey(clrNamespace)) 1381if (!ClrNamespaces.ContainsKey(uniqueNamespace)) 1498if (fragments.ContainsKey(nsFragment)) 1504if (!fragments.ContainsKey(uniqueNsFragment))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
2072if (typesChecked.ContainsKey(type)) 2149if (!knownDataContracts.ContainsKey(itemDataContract.StableName))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (3)
328return ProcessedContracts.ContainsKey(dataContract); 385if (!_referencedCollectionTypesDictionary.ContainsKey(genericDictionaryName) && GetReferencedTypes().ContainsKey(genericDictionaryName))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\HybridObjectCache.cs (2)
45else if (!_referencedObjectDictionary.ContainsKey(id)) 64return _referencedObjectDictionary.ContainsKey(id);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ObjectReferenceStack.cs (1)
93if (_objectDictionary != null && _objectDictionary.ContainsKey(obj))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (1)
197if (!previousCollectionTypes.ContainsKey(dataContract.OriginalUnderlyingType))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
152if (headers.ContainsKey(key))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (4)
226if (importer.State.ContainsKey(contractAssociationName)) 239if (importer.State.ContainsKey(InSecureConversationBootstrapBindingImportMode)) 589if (importer.State.ContainsKey(InSecureConversationBootstrapBindingImportMode)) 647if ((importer.State != null) && (!importer.State.ContainsKey(MaxPolicyRedirectionsKey)))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
143if (!_connectionMapping.ContainsKey(connection))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportBindingElementImporter.cs (1)
218return GetGeneratedTransportBindingElements(importer).ContainsKey(key);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (2)
170if (_dataContractSerializerOperationGenerator._isNonNillableReferenceTypes.ContainsKey(part)) 226return _dataContractSerializerOperationGenerator._isNonNillableReferenceTypes.ContainsKey(part);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (4)
854if (!prefixesUsed.ContainsKey(pair.Name)) 1629if (importer.State.ContainsKey(type)) 1912if (importer.State.ContainsKey(typeof(XmlSerializerImportOptions))) 1986if (importer.State.ContainsKey(type))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
600return _usedRetrievers.ContainsKey(retriever);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (3)
116if (!_operationBindingAssertions.ContainsKey(operation)) 127if (!_messageBindingAssertions.ContainsKey(message)) 137if (!_faultBindingAssertions.ContainsKey(fault))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
741else if (_parent._parameterTypes.ContainsKey(setting)) 749if (_parent._parameterAttributes != null && _parent._parameterAttributes.ContainsKey(setting))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\SoapHelper.cs (1)
178if (versions != null && ((Dictionary<WsdlNS.Binding, EnvelopeVersion>)versions).ContainsKey(wsdlBinding))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TransactionFlowAttribute.cs (1)
40if (dictionary.ContainsKey(da))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (4)
41if (!_exportedContracts.ContainsKey(contract)) 154if (_exportedEndpoints.ContainsKey(endpointKey)) 660if (exporter.State.ContainsKey(key) && exporter.State[key] is SupportedAddressingMode) 956if (!_lookup.ContainsKey(prefix))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (7)
228if (!this.KnownContracts.ContainsKey(WsdlExporter.WsdlNamingHelper.GetPortTypeQName(contract))) 295return _importErrors.ContainsKey(item); 1692if (unique.ContainsKey(element)) 1868if (_warnings.ContainsKey(warningMessage)) 2003if (!_policyDictionary.PolicySourceTable.ContainsKey(element)) 2337else if (wsdlPolicyDictionary.ContainsKey(key)) 2367if (_externalPolicyDictionary.ContainsKey(key))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (2)
182if (!_partInfoTable.ContainsKey(part)) 187if (!alreadyExported.ContainsKey(membersMapping))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (4)
48if (!_operationMap.ContainsKey(operation.SyncMethod)) 54if (!_operationMap.ContainsKey(operation.BeginMethod)) 63if (!_operationMap.ContainsKey(operation.TaskMethod)) 79if (_operationMap.ContainsKey(method))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ScopedMessagePartSpecification.cs (3)
93if (!_actionParts.ContainsKey(action)) 140if (_readOnlyNormalizedActionParts.ContainsKey(action)) 146else if (_actionParts.ContainsKey(action))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
766if (action != null && _mergedSupportingTokenAuthenticatorsMap.ContainsKey(action)) 774else if (_mergedSupportingTokenAuthenticatorsMap.ContainsKey(MessageHeaders.WildcardAction))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (8)
591if (false == importer.State.ContainsKey(SecurityBindingElementImporter.InSecureConversationBootstrapBindingImportMode)) 2643if (exporter.State.ContainsKey(SecurityPolicyStrings.SecureConversationBootstrapBindingElementsBelowSecurityKey)) 2729if (importer.State.ContainsKey(SecurityBindingElementImporter.SecureConversationBootstrapEncryptionRequirements)) 2738if (importer.State.ContainsKey(SecurityBindingElementImporter.SecureConversationBootstrapSignatureRequirements)) 2751if (importer.State.ContainsKey(SecurityBindingElementImporter.SecureConversationBootstrapEncryptionRequirements)) 2753if (importer.State.ContainsKey(SecurityBindingElementImporter.SecureConversationBootstrapSignatureRequirements)) 2869if ((importer.State != null) && (importer.State.ContainsKey(MetadataExchangeClient.MetadataExchangeClientKey))) 2942if ((importer.State != null) && (importer.State.ContainsKey(MetadataExchangeClient.MetadataExchangeClientKey)))
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (2)
143return _dictionary.ContainsKey(key); 205if (_dictionary.ContainsKey(key))
ImportModule.cs (3)
352if (!importer.State.ContainsKey(typeof(WrappedOptions))) 360if (!importer.State.ContainsKey(typeof(WrappedOptions))) 388if (!_bindingContractMapping.ContainsKey(context.Endpoint.Binding))
Metadata\ServiceDescriptorFactory.cs (1)
48if (_cache.ContainsKey(key) && _cache[key].MetadataImported)
Shared\ProjectPropertyResolver.cs (1)
105if (!propertyTable.ContainsKey(propertyName))
Identity.DefaultUI.WebSite (3)
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (3)
198if (_logins.ContainsKey(key)) 235if (_users.ContainsKey(userId)) 255if (user == null || !_users.ContainsKey(user.Id))
illink (9)
ILLink.Tasks (2)
CreateRuntimeRootDescriptorFile.cs (2)
198 if (!featureSwitchMembers.ContainsKey (currentFeatureSwitch.Value)) { 470 if (!namespaceDictionary.ContainsKey (classNamespace)) {
Infrastructure.Common (2)
TestEventListener.cs (1)
82if (_targetSourceName.ContainsKey(source.Name))
TestProperties.cs (1)
55string result = s_properties.Value.ContainsKey(propertyName)
InMemory.FunctionalTests (7)
Http2\Http2ConnectionTests.cs (6)
2233Assert.False(_receivedHeaders.ContainsKey(header.Key)); 2234Assert.True(_receivedTrailers.ContainsKey(header.Key)); 4864Assert.False(_receivedHeaders.ContainsKey("trailer-1")); 4865Assert.False(_receivedHeaders.ContainsKey("trailer-2")); 4866Assert.True(_receivedTrailers.ContainsKey("trailer-1")); 4867Assert.True(_receivedTrailers.ContainsKey("trailer-2"));
Http2\Http2StreamTests.cs (1)
3781Assert.False(ConnectionTags.ContainsKey(KestrelMetrics.ErrorTypeAttributeName), "Non-error reason shouldn't be added to error.type");
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (3)
921Assert.False(request1Headers.ContainsKey("alt-used")); 934Assert.True(request2Headers.ContainsKey("alt-used")); 950Assert.True(request3Headers.ContainsKey("alt-used"));
IOperationGenerator (2)
IOperationClassWriter.cs (1)
1101return _typeMap.ContainsKey(GetTypeNameWithoutNullable(typeName)) ||
IOperationClassWriter.Verifier.cs (1)
30if (!_typeMap.ContainsKey(abstractNode.Base))
KeyManagementSimulator (1)
Program.cs (1)
431if (!_knownKeyIds.Contains(defaultKeyId) && !_missingSinceMap.ContainsKey(defaultKeyId))
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
37public bool FileExists(string path) => Files.ContainsKey(path);
Microsoft.AspNetCore.Authentication.Test (9)
GoogleTests.cs (9)
63Assert.True(queryParams.ContainsKey("redirect_uri")); 64Assert.True(queryParams.ContainsKey("scope")); 65Assert.True(queryParams.ContainsKey("state")); 66Assert.True(queryParams.ContainsKey("code_challenge")); 69Assert.False(queryParams.ContainsKey("access_type")); 70Assert.False(queryParams.ContainsKey("prompt")); 71Assert.False(queryParams.ContainsKey("approval_prompt")); 72Assert.False(queryParams.ContainsKey("login_hint")); 73Assert.False(queryParams.ContainsKey("include_granted_scopes"));
Microsoft.AspNetCore.BrowserTesting (2)
BrowserManager.cs (2)
65if (!_launchBrowsers.ContainsKey(browserName)) 163_launchBrowsers.ContainsKey(browserKind.ToString());
Microsoft.AspNetCore.Components (4)
Reflection\ComponentProperties.cs (1)
322if (_underlyingWriters.ContainsKey(propertyName))
RenderTree\Renderer.cs (1)
442if (!_componentStateById.ContainsKey(renderedByComponentId))
RenderTree\RenderTreeDiffBuilder.cs (1)
337if (result.ContainsKey(key))
Sections\SectionRegistry.cs (1)
56if (_subscribersByIdentifier.ContainsKey(identifier))
Microsoft.AspNetCore.Components.Endpoints (4)
Discovery\ComponentCollectionBuilder.cs (2)
18if (!_components.ContainsKey(assembly)) 29if (_components.ContainsKey(assembly))
Discovery\PageCollectionBuilder.cs (2)
17if (!_pages.ContainsKey(assembly)) 28if (_pages.ContainsKey(assembly))
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentsServiceCollectionExtensionsTest.cs (1)
80.Where(sd => !multiRegistrationServiceTypes.ContainsKey(sd.ServiceType))
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\WebRootComponentManager.cs (1)
48if (_webRootComponents.ContainsKey(ssrComponentId))
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\WebRootComponentManager.cs (1)
48if (_webRootComponents.ContainsKey(ssrComponentId))
Microsoft.AspNetCore.Components.WebView.Test (1)
Infrastructure\TestDocument.cs (1)
18if (_componentsById.ContainsKey(componentId))
Microsoft.AspNetCore.DataProtection (2)
KeyManagement\KeyRing.cs (1)
31if (!_keyIdToKeyHolderMap.ContainsKey(defaultKey.KeyId))
KeyManagement\XmlKeyManager.cs (1)
201if (keyIdToKeyMap.ContainsKey(key.KeyId))
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\Json\JsonConverterFactoryForWellKnownTypes.cs (1)
34return JsonConverterHelper.WellKnownTypeNames.ContainsKey(descriptor.FullName);
Internal\Json\MessageTypeInfoResolver.cs (1)
83if (JsonConverterHelper.WellKnownTypeNames.ContainsKey(messageDescriptor.FullName))
Internal\JsonRequestHelpers.cs (1)
434if (serverCallContext.DescriptorInfo.RouteParameterDescriptors.ContainsKey(variable))
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (1)
154if (!resolvedProviders.ContainsKey(compressionProvider.EncodingName))
Microsoft.AspNetCore.Http (5)
FormCollection.cs (1)
112return Store.ContainsKey(key);
HeaderDictionary.cs (1)
254return Store.ContainsKey(key);
QueryCollection.cs (1)
127return Store.ContainsKey(key);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
118return ReadDictionary.ContainsKey(key);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
287return _dictionaryStorage.ContainsKey(key);
Microsoft.AspNetCore.Identity.InMemory.Test (5)
InMemoryStore.cs (2)
80if (role == null || !_roles.ContainsKey(role.Id)) 112if (_roles.ContainsKey(roleId))
InMemoryUserStore.cs (3)
198if (_logins.ContainsKey(key)) 235if (_users.ContainsKey(userId)) 255if (user == null || !_users.ContainsKey(user.Id))
Microsoft.AspNetCore.JsonPatch.Tests (1)
WriteOnceDynamicTestObject.cs (1)
109if (_dictionary.ContainsKey(key))
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
101return _inner.ContainsKey(key);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
190if (!statusCodes.ContainsKey(statusCode))
Microsoft.AspNetCore.Mvc.Core (5)
Builder\ControllerEndpointRouteBuilderExtensions.cs (3)
34if (!result.Items.ContainsKey(EndpointRouteBuilderKey)) 57if (!dataSource.DefaultBuilder.Items.ContainsKey(EndpointRouteBuilderKey)) 106if (!dataSource.DefaultBuilder.Items.ContainsKey(EndpointRouteBuilderKey))
Infrastructure\ActionSelectionTable.cs (1)
153if (!ordinalEntries.ContainsKey(routeValues))
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
118return ReadDictionary.ContainsKey(key);
Microsoft.AspNetCore.Mvc.Core.Test (2)
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
223.Where(sd => !multiRegistrationServiceTypes.ContainsKey(sd.ServiceType))
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
1657return Results.ContainsKey(propertyMetadata);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
SerializableErrorWrapperTests.cs (1)
40Assert.True(wrapper.SerializableError.ContainsKey("key1"));
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
FormFileUploadTest.cs (2)
80Assert.True(product.Specs.ContainsKey("camera")); 82Assert.True(product.Specs.ContainsKey("battery"));
RoutingTestsBase.cs (2)
100Assert.False(result.RouteValues.ContainsKey("page")); 424if (result.RouteValues.ContainsKey("id"))
Microsoft.AspNetCore.Mvc.Razor (1)
Compilation\DefaultViewCompiler.cs (1)
60if (!compiledViews.ContainsKey(compiledView.RelativePath))
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
71if (!_precompiledViews.ContainsKey(precompiledView.RelativePath))
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
InputTagHelperTest.cs (1)
1682It.Is<Dictionary<string, object>>(m => m.ContainsKey("type")))) // htmlAttributes
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
465.Where(sd => !multiRegistrationServiceTypes.ContainsKey(sd.ServiceType))
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
TempDataDictionary.cs (1)
207return _data.ContainsKey(key);
Microsoft.AspNetCore.RateLimiting (6)
RateLimiterOptions.cs (6)
53if (PolicyMap.ContainsKey(policyName) || UnactivatedPolicyMap.ContainsKey(policyName)) 71if (PolicyMap.ContainsKey(policyName) || UnactivatedPolicyMap.ContainsKey(policyName)) 96if (PolicyMap.ContainsKey(policyName) || UnactivatedPolicyMap.ContainsKey(policyName))
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
118return ReadDictionary.ContainsKey(key);
Microsoft.AspNetCore.Routing (4)
Matching\AcceptsMatcherPolicy.cs (1)
164if (!edges.ContainsKey(contentType))
Matching\HostMatcherPolicy.cs (1)
211if (!edges.ContainsKey(host))
Matching\HttpMethodMatcherPolicy.cs (2)
195if (!edges.ContainsKey(key)) 205if (!edges.ContainsKey(key))
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http3\Http3Connection.cs (1)
923Debug.Assert(!_webtransportSessions.ContainsKey(http3Stream.StreamId));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (14)
ConnectionDispatcherTests.cs (1)
46Assert.True(pairs.ContainsKey("ConnectionId"));
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (7)
514Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 530Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 546Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 562Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 578Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 594Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 731Assert.False(_handler.DecodedHeaders.ContainsKey(string8194));
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (6)
192Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 208Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 224Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 240Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 256Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 272Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
Microsoft.AspNetCore.Shared.Tests (15)
runtime\Http2\HPackDecoderTest.cs (7)
514Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 530Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 546Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 562Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 578Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 594Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderNameString)); 731Assert.False(_handler.DecodedHeaders.ContainsKey(string8194));
runtime\Http3\QPackDecoderTest.cs (6)
192Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 208Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 224Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 240Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 256Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString)); 272Assert.True(_handler.DecodedHeaders.ContainsKey(_literalHeaderFieldString));
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
118return ReadDictionary.ContainsKey(key);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
287return _dictionaryStorage.ContainsKey(key);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
2176if (_pendingCalls.ContainsKey(irq.InvocationId))
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
791if (_methods.ContainsKey(methodName))
Microsoft.Build (55)
BackEnd\BuildManager\BuildManager.cs (1)
2878if (!_projectStartedEvents.ContainsKey(e.BuildEventContext!.SubmissionId))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
333ErrorUtilities.VerifyThrow(!_requestsByGlobalRequestId.ContainsKey(request.GlobalRequestId), "Request {0} is already known to the engine.", request.GlobalRequestId); 401ErrorUtilities.VerifyThrow(_requestsByGlobalRequestId.ContainsKey(unblocker.BlockedRequestId), "Request {0} is not known to the engine.", unblocker.BlockedRequestId);
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (3)
366ErrorUtilities.VerifyThrow(!_outstandingResults.ContainsKey(result.NodeRequestId), "Request already contains results."); 506ErrorUtilities.VerifyThrow(!_outstandingRequests.ContainsKey(newRequest.NodeRequestId), "Already waiting for local request {0}", newRequest.NodeRequestId); 514if (!_unresolvedConfigurations.ContainsKey(newRequest.ConfigurationId))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
186ErrorUtilities.VerifyThrow(_nodeContexts.ContainsKey(hostContext), "Invalid host context specified: {0}.", hostContext.ToString()); 490if (!_nodeContexts.ContainsKey(hostContext))
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
622if (!additionalProjectPropertiesTable.ContainsKey(entry.Key))
BackEnd\Components\RequestBuilder\Lookup.cs (3)
833ErrorUtilities.VerifyThrow(!_cloneTable.ContainsKey(cloneItem), "Should be new, not already in table!"); 975ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table"); 1131return _modifications.ContainsKey(metadataName);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
690if (_requestEntry.RequestConfiguration.ActivelyBuildingTargets.ContainsKey(targetSpecification.TargetName))
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
841if (!itemVectorCollection.ContainsKey(itemVectorType)) 849ErrorUtilities.VerifyThrow(!itemVectorCollection[itemVectorType].ContainsKey(item), "ItemVectorPartition already contains a vector for items with the expression '{0}'", item);
BackEnd\Components\Scheduler\SchedulableRequest.cs (1)
345ErrorUtilities.VerifyThrow(!_requestsWeAreBlockedBy.ContainsKey(key), "We are already blocked by this request.");
BackEnd\Components\Scheduler\SchedulingData.cs (8)
286if (!_buildHierarchy.ContainsKey(request)) 293ErrorUtilities.VerifyThrow(_buildHierarchy.ContainsKey(parent), "Parent doesn't exist in build hierarchy for request {0}", request.BuildRequest.GlobalRequestId); 369ErrorUtilities.VerifyThrow(!_blockedRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already blocked!"); 374ErrorUtilities.VerifyThrow(!_yieldingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already yielded!"); 379ErrorUtilities.VerifyThrow(_configurationToRequests.ContainsKey(request.BuildRequest.ConfigurationId), "Configuration {0} never had requests assigned to it.", request.BuildRequest.ConfigurationId); 391ErrorUtilities.VerifyThrow(!_executingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already executing!"); 392ErrorUtilities.VerifyThrow(!_executingRequestByNode.ContainsKey(request.AssignedNode) || _executingRequestByNode[request.AssignedNode] == null, "Node {0} is currently executing a request.", request.AssignedNode); 405ErrorUtilities.VerifyThrow(!_readyRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already ready!");
BackEnd\Shared\BuildResult.cs (1)
666if (additionalEntries is not null && additionalEntries.ContainsKey(SpecialKeyForVersion))
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
409setParameters.ContainsKey(requiredParameter.Key),
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
586!_deferredProjectEvalIdToImportedProjects.ContainsKey(checkContext.BuildEventContext.EvaluationId))
Collections\ItemDictionary.cs (2)
232return _nodes.ContainsKey(projectItem); 371ErrorUtilities.VerifyThrow(!_itemLists.ContainsKey(itemType), "Should be none");
Construction\Solution\SolutionFile.cs (3)
676if (!_solutionConfigurationsByFullName.ContainsKey(solutionConfiguration.FullName)) 864bool uniqueNameExists = projectsByUniqueName.ContainsKey(uniqueName); 1787rawProjectConfigurationsEntries.ContainsKey(entryNameBuild));
Definition\ProjectCollection.cs (1)
526if (!_toolsets.ContainsKey(value))
Definition\ToolsetReader.cs (8)
180if (v4Dir != null && !toolsets.ContainsKey("4.0")) 204if (toolsets.ContainsKey(version)) 223if (!toolsets.ContainsKey(MSBuildConstants.CurrentToolsVersion)) 244if (((locations & ToolsetDefinitionLocations.Registry) != 0) && !toolsets.ContainsKey("2.0") 294if (defaultToolsVersion != null && toolsets.ContainsKey(defaultToolsVersion)) 302if (toolsets.ContainsKey(Constants.defaultToolsVersion)) 323if (toolsets.ContainsKey(defaultToolsVersion)) 412if (!toolsets.ContainsKey(toolsVersion.Name))
Evaluation\Evaluator.cs (2)
1063if (activeTargets.ContainsKey(unescapedBeforeTarget)) 1086if (activeTargets.ContainsKey(unescapedAfterTarget))
Evaluation\LazyItemEvaluator.cs (1)
388if (itemsWithNoWildcards.ContainsKey(fullPath))
Evaluation\PropertiesUseTracker.cs (1)
96else if (_properties.ContainsKey(propertyName))
Graph\GraphBuilder.cs (1)
208if (projectsByPath.ContainsKey(projectPath))
Instance\HostServices.cs (1)
327if (!hostObject._hostObjects.ContainsKey(targetTaskKey))
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
1724if (!_startedEvent.ContainsKey(buildEventContext))
Logging\ParallelLogger\ParallelLoggerHelpers.cs (2)
47if (!_projectStartedEvents.ContainsKey(e.BuildEventContext)) 85if (!_targetStartedEvents.ContainsKey(e.BuildEventContext))
PlatformNegotiation.cs (2)
64projectReferenceLookupTable.ContainsKey(currentProjectPlatform) && 72currentProjectLookupTable.ContainsKey(currentProjectPlatform) &&
ToolsetElement.cs (3)
275if (_previouslySeenOS.ContainsKey(os)) 458if (_previouslySeenPropertyNames.ContainsKey(propertyName)) 629if (_previouslySeenToolsVersions.ContainsKey(toolsVersion))
Microsoft.Build.BuildCheck.UnitTests (2)
ConfigurationProvider_Tests.cs (2)
59configs.ContainsKey("property1").ShouldBeTrue(); 60configs.ContainsKey("property2").ShouldBeTrue();
Microsoft.Build.Engine.OM.UnitTests (3)
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (1)
209if (imported.ContainsKey(other.CollectionId))
ObjectModelRemoting\RemoteProjectsProviderMock\LinkedObjectsMap.cs (2)
95while (nextLocalId == 0 || activeLinks.ContainsKey(nextLocalId)); 136} while (nextCollectionId == 0 || collections.ContainsKey(nextCollectionId));
Microsoft.Build.Engine.UnitTests (23)
BackEnd\BinaryTranslator_Tests.cs (1)
523Assert.False(deserializedValue.ContainsKey("FOO"));
BackEnd\NodeEndpointInProc_Tests.cs (2)
260Assert.False(_linkStatusTable.ContainsKey(endpoints.NodeEndpoint)); 261Assert.False(_linkStatusTable.ContainsKey(endpoints.ManagerEndpoint));
BackEnd\TaskExecutionHost_Tests.cs (15)
148Assert.True(_parametersSetOnTask.ContainsKey("ExecuteReturnParam")); 340Assert.True(_parametersSetOnTask.ContainsKey("IntArrayParam")); 1300Assert.True(_outputsReadFromTask.ContainsKey(outputName)); 1312Assert.True(_outputsReadFromTask.ContainsKey(outputName)); 1324Assert.True(_outputsReadFromTask.ContainsKey(outputName)); 1339Assert.True(_outputsReadFromTask.ContainsKey(outputName)); 1354Assert.True(_outputsReadFromTask.ContainsKey(outputName)); 1367Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1378Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1392Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1405Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1419Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1437Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1455Assert.True(_parametersSetOnTask.ContainsKey(parameterName)); 1473Assert.False(_parametersSetOnTask.ContainsKey(parameterName));
BuildEnvironmentHelper_Tests.cs (1)
553return _mockEnvironment.ContainsKey(variable) ? _mockEnvironment[variable] : null;
Collections\OMcollections_tests.cs (1)
232Assert.True(dictionary.ContainsKey("p2"));
Definition\ToolsetConfigurationReader_Tests.cs (1)
585Assert.True(pathsTable.ContainsKey(kind));
Graph\ResultCacheBasedBuilds_Tests.cs (1)
452var cacheFilesForReferences = node.ProjectReferences.Where(r => outputCaches.ContainsKey(r)).Select(r => outputCaches[r]).ToArray();
InternalEngineHelpers.cs (1)
148return _mapping.ContainsKey(sdkReference.Name)
Microsoft.Build.Tasks.CodeAnalysis (2)
MapSourceRoots.cs (1)
136if (topLevelMappedPaths.ContainsKey(localPath))
Vbc.cs (1)
914if (_store.ContainsKey(nameof(OptionInfer)))
Microsoft.Build.Tasks.Core (38)
AssemblyDependency\Reference.cs (1)
153if (!_sourceItems.ContainsKey(itemSpec))
AssemblyDependency\ReferenceTable.cs (2)
3170if (exclusionList?.ContainsKey(assemblyFullName) == true) 3221return _externallyResolvedImmutableFiles.ContainsKey(path);
BootstrapperUtil\BootstrapperBuilder.cs (7)
264if (!output.ContainsKey(product.ProductCode.ToLowerInvariant())) 295if (builtProducts.ContainsKey(p.ProductCode.ToLowerInvariant())) 306if (productsAndIncludes.ContainsKey(p.ProductCode.ToLowerInvariant())) 483return _cultures.ContainsKey(culture); 571if (!_cultures.ContainsKey(culture)) 1037if (!_validationResults.ContainsKey(productCodeAttribute.Value)) 2227if (!includedProducts.ContainsKey(product.ProductCode))
BootstrapperUtil\PackageCollection.cs (1)
32if (!_cultures.ContainsKey(package.Culture))
BootstrapperUtil\Product.cs (2)
120return _cultures.ContainsKey(culture); 164if (!_cultures.ContainsKey(package.Culture))
BootstrapperUtil\ProductCollection.cs (1)
30if (!_table.ContainsKey(product.ProductCode))
BootstrapperUtil\productvalidationresults.cs (1)
30if (!_packageValidationResults.ContainsKey(culture))
CreateItem.cs (1)
108(!excludeItems.ContainsKey(i.ItemSpec)))
GenerateResource.cs (1)
3849if (reader.resourcesHashTable.ContainsKey(entry.Name))
ManifestUtil\ApplicationManifest.cs (3)
586if (!usedExtensions.ContainsKey(fileAssociation.Extension)) 664if (!targetPathList.ContainsKey(key)) 710if (!targetPathList.ContainsKey(key))
ManifestUtil\AssemblyIdentity.cs (1)
398if (!redistDictionary.ContainsKey(path))
ManifestUtil\Manifest.cs (1)
633if (!identityList.ContainsKey(key))
ManifestUtil\Util.cs (1)
448if (!list.ContainsKey(key))
MSBuild.cs (1)
570if (!additionalProjectPropertiesTable.ContainsKey(entry.Key))
PlatformNegotiation.cs (2)
64projectReferenceLookupTable.ContainsKey(currentProjectPlatform) && 72currentProjectLookupTable.ContainsKey(currentProjectPlatform) &&
RedistList.cs (1)
120if (!simpleNameMap.ContainsKey(entry.SimpleName))
ResolveManifestFiles.cs (8)
865Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key)); 866if (!_dictionary.ContainsKey(key)) 878if (!_simpleNameDictionary.ContainsKey(key)) 911return _dictionary.ContainsKey(identity.ToString()); 924Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key)); 925if (!_dictionary.ContainsKey(key)) 965Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same '{0}' attribute detected", ItemMetadataNames.targetPath)); 967if (!_dictionary.ContainsKey(key))
ResolveSDKReference.cs (3)
484if (referencesToAddMetadata.ContainsKey(sdkSimpleName) && referencesToAddMetadata[sdkSimpleName].Equals(rawSdkVersion, StringComparison.InvariantCultureIgnoreCase)) 1042if (!FrameworkIdentitiesFromManifest.ContainsKey(kvp.Key)) 1059if (!AppxLocationsFromManifest.ContainsKey(kvp.Key))
Microsoft.Build.Tasks.UnitTests (17)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
845if (!uniqueFileExists.ContainsKey(lowerPath)) 1037if (!uniqueGetAssemblyName.ContainsKey(lowerPath))
GetInstalledSDKLocations_Tests.cs (12)
342Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=1.0")); 348Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=2.0")); 354Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=3.0")); 361Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=4.0")); 367Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=5.0")); 373Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=6.0")); 416Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=1.0")); 422Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=2.0")); 428Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=3.0")); 435Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=4.0")); 441Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=5.0")); 447Assert.True(extensionSDKs.ContainsKey("MyAssembly, Version=6.0"));
MockUnmanagedMemoryHelper.cs (2)
47if (!_dependentAllocations.ContainsKey(_mainAllocationHandle)) 74if (_dependentAllocations.ContainsKey(handle))
ResourceHandling\GenerateResource_Tests.cs (1)
3648Assert.True(valuesFromResource.ContainsKey(resxDataName));
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
1763if (!nodes.ContainsKey(parent)) 1786if (!nodes.ContainsKey(reference))
Microsoft.Build.Utilities.Core (18)
MuxLogger.cs (1)
240if (_submissionProjectsInProgress.ContainsKey(submissionId))
TargetPlatformSDK.cs (1)
186return Platforms.ContainsKey(sdkKey);
ToolLocationHelper.cs (4)
533&& platform.ExtensionSDKs.ContainsKey(sdkMoniker)) 2544if (!targetPlatformSDK.ExtensionSDKs.ContainsKey(SDKKey)) 2815if (!targetPlatformSDK.ExtensionSDKs.ContainsKey(sdkKey)) 3046if (!sdk.Platforms.ContainsKey(sdkKey))
ToolsetElement.cs (3)
275if (_previouslySeenOS.ContainsKey(os)) 458if (_previouslySeenPropertyNames.ContainsKey(propertyName)) 629if (_previouslySeenToolsVersions.ContainsKey(toolsVersion))
TrackedDependencies\CanonicalTrackedInputFiles.cs (4)
693if (!primaryFiles.ContainsKey(FileUtilities.NormalizePath(file.ItemSpec))) 741if (!dependencies.ContainsKey(tlogEntry)) 769if (primaryFiles.ContainsKey(tlogEntry)) 784else if (!dependencies.ContainsKey(tlogEntry))
TrackedDependencies\CanonicalTrackedOutputFiles.cs (4)
204else if (tlogEntry[0] != '^' && tlogEntry[0] != '#' && !dependencies.ContainsKey(tlogEntry)) 293if (root.Value.ContainsKey(output)) 483if (!outputs.ContainsKey(dependee)) 553if (!dependencies.ContainsKey(fullComputedOutput))
TrackedDependencies\FlatTrackingData.cs (1)
452if (!DependencyTable.ContainsKey(tlogEntry))
Microsoft.Build.Utilities.UnitTests (2)
ToolLocationHelper_Tests.cs (2)
3810targetPlatforms.ContainsKey(key).ShouldBeFalse(); 4079targetPlatforms.ContainsKey(key).ShouldBeFalse();
Microsoft.Cci.Extensions (2)
Filters\BaselineDifferenceFilter.cs (2)
52if (_ignoreDifferences.ContainsKey(difference.Id)) 60if (_ignoreDifferences.ContainsKey(diff))
Microsoft.CodeAnalysis (20)
CodeGen\CompilationTestData.cs (1)
72if (map.ContainsKey(name))
Collections\IdentifierCollection.cs (1)
112return _map.ContainsKey(identifier);
Collections\TopologicalSort.cs (1)
117if (!predecessorCounts.ContainsKey(n))
CommandLine\CommonCompiler.cs (1)
444if (embeddedTreeMap.ContainsKey(tree.FilePath))
CommandLine\SarifV1ErrorLogger.cs (1)
275} while (_counters.ContainsKey(key));
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
295if (!_analyzerActionCounts.ContainsKey(analyzer))
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
129return _analyzerAssemblyInfoMap.ContainsKey(fullPath);
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1598=> added.ContainsKey(item);
Emit\EditAndContinue\EmitBaseline.cs (1)
548if (!result.ContainsKey(key))
Emit\EditAndContinue\SymbolChanges.cs (2)
401if (!changesBuilder.ContainsKey(newContainingType)) 482if (containingSymbol == null || changes.ContainsKey(containingSymbol))
InternalUtilities\MultiDictionary.cs (1)
290return _dictionary.ContainsKey(k);
MetadataReader\PEModule.cs (1)
827if (!namespaces.ContainsKey(namespaceName))
NativePdbWriter\PdbWriter.cs (1)
782.Where(kvp => !_documentIndex.ContainsKey(kvp.Value))
Operations\ControlFlowGraphBuilder.cs (1)
8003if (explicitProperties.ContainsKey(property))
Operations\OperationMapBuilder.cs (1)
113!argument.ContainsKey(operation.Syntax),
PEWriter\MetadataWriter.cs (2)
683if (!_fileRefIndex.ContainsKey(key)) 1792if (documentsBuilder.TryGetDebugDocument(tree.FilePath, basePath: null) is { } doc && !_documentIndex.ContainsKey(doc))
PEWriter\MetadataWriter.PortablePdb.cs (1)
795.Where(kvp => !_documentIndex.ContainsKey(kvp.Value))
RuleSet\RuleSet.cs (1)
175if (effectiveSpecificOptions.ContainsKey(item.Key))
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
174if (!enumValues.ContainsKey(enumValue))
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
290return _dictionary.ContainsKey(k);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (2)
159if (!symbolsWriteMap.ContainsKey(key)) 225if (!SymbolsWriteBuilder.ContainsKey(symbolAndWrite) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
134if (!other._reachingWrites.ContainsKey(key))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (2)
464Debug.Assert(!previousChangesMap.ContainsKey(currentToken)); 507if (previousChangesMap.ContainsKey(tokenWithIndex.Token))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
400!equivalentTypesWithDifferingAssemblies.ContainsKey(x))
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Constraints.cs (1)
47if (!names.ContainsKey(name))
Binder\RefSafetyAnalysis.cs (8)
178Debug.Assert(_localEscapeScopes?.ContainsKey(local) == true || _symbol != local.ContainingSymbol); 187Debug.Assert(_localEscapeScopes?.ContainsKey(local) == true); 194Debug.Assert(_placeholderScopes?.ContainsKey(placeholder) != true); 206Debug.Assert(_placeholderScopes?.ContainsKey(placeholder) == true); 216Debug.Assert(_placeholderScopes?.ContainsKey(placeholder) == true); 226if (_placeholderScopes?.ContainsKey(placeholder) == true) 429Debug.Assert(_localEscapeScopes?.ContainsKey(node.LocalSymbol) == true || 457Debug.Assert(_localEscapeScopes?.ContainsKey(local) != true);
Binder\SwitchBinder.cs (1)
125if (!map.ContainsKey(key))
Compilation\MemberSemanticModel.cs (6)
1458alreadyInTree = _guardedBoundNodeMap.ContainsKey(bound.Syntax); 1466Debug.Assert(syntax != _root || _guardedBoundNodeMap.ContainsKey(bound.Syntax)); 1490alreadyInTree = _guardedBoundNodeMap.ContainsKey(bound.Syntax); 1502Debug.Assert(syntax != _root || _guardedBoundNodeMap.ContainsKey(bound.Syntax)); 1952_guardedBoundNodeMap.ContainsKey(bindableRoot) || 1953_guardedBoundNodeMap.ContainsKey(bind(bindableRoot, out _).Syntax));
Compilation\MemberSemanticModel.NodeMapBuilder.cs (1)
43if (root == null || map.ContainsKey(root.Syntax))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
777return _labelsInInterestingTry != null && _labelsInInterestingTry.ContainsKey(statement);
Lowering\ClosureConversion\ClosureConversion.cs (1)
344Debug.Assert(!_frames.ContainsKey(scope.BoundNode));
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.YieldsInTryAnalysis.cs (1)
39return _labelsInYieldingTrys != null && _labelsInYieldingTrys.ContainsKey(statement);
Lowering\MethodToClassRewriter.cs (2)
497Debug.Assert(!proxies.ContainsKey(leftLocal.LocalSymbol)); 503if (NeedsProxy(leftLocal.LocalSymbol) && !proxies.ContainsKey(leftLocal.LocalSymbol))
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
284Debug.Assert(!NeedsProxy(local) || proxies.ContainsKey(local)); 840if (proxies.ContainsKey(leftLocal))
Symbols\Source\ConstantEvaluationHelpers.cs (1)
284if (graph.ContainsKey(field) && IsPartOfCycle(graph, field))
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2081if (!conversionsAsMethods.ContainsKey(conversion)) 2254if (membersByName.ContainsKey(indexerName.AsMemory())) 4612if (memberNames.Contains(symbol.Name) || this.GetTypeMembersDictionary().ContainsKey(symbol.Name.AsMemory()))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
681if (!result.ContainsKey(returnTypeParameter))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
FlowAnalysis\FlowDiagnosticTests.cs (1)
387if (!warnings.ContainsKey(e.Code)) warnings[e.Code] = 0;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\MethodBodyModelTests.cs (1)
130if (!errors.ContainsKey(e.Code)) errors[e.Code] = 0;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
LexicalAndXml\XmlDocCommentTests.cs (1)
3399Assert.True(attributes.ContainsKey(attribute.Name.LocalName.Value as string));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1068Assert.True(expectedBlobs.ContainsKey(s), "Expecting marshalling blob for " + (isField ? "field " : "parameter ") + s);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
681if (!result.ContainsKey(returnTypeParameter))
Microsoft.CodeAnalysis.EditorFeatures (2)
Classification\Syntactic\SyntacticClassificationTaggerProvider.ClassifiedLineCache.cs (1)
142if (_spanToLruNode.ContainsKey(span))
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
91if (_isActive && oldSolutionVersion >= _baselineSolutionVersion && !_documentsWithChangedLoaderByPath.ContainsKey(oldDocument.FilePath))
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Native.cs (1)
465localNames[name] = localNames.ContainsKey(name) ? LocalKind.DuplicateName : LocalKind.ConstantName;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (3)
122if (!isProxyType || browsableState == null || !browsableState.ContainsKey(memberName)) 194isFavorite: favoritesMemberNames?.ContainsKey(memberName) == true && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName))); 580if (!result.ContainsKey(browsableAttribute.TargetMember))
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (4)
Debugger\Engine\DkmDataContainer.cs (1)
42if (_dataItems.ContainsKey(key))
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (3)
122if (!isProxyType || browsableState == null || !browsableState.ContainsKey(memberName)) 194isFavorite: favoritesMemberNames?.ContainsKey(memberName) == true && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName))); 580if (!result.ContainsKey(browsableAttribute.TargetMember))
Microsoft.CodeAnalysis.Features (8)
ChangeSignature\AbstractChangeSignatureService.cs (2)
341if (!nodesToUpdate.ContainsKey(documentId)) 365if (!nodesToUpdate.ContainsKey(documentId2))
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (1)
189=> EscapeCategories.ContainsKey(value);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (2)
232Debug.Assert(!_cancellationMap.ContainsKey(key)); 246if (workQueue.ContainsKey(projectId))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
368if (_pendingWork.ContainsKey(projectId))
ExtractMethod\ExtractMethodMatrix.cs (1)
55if (!s_matrix.ContainsKey(key))
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
174if (!enumValues.ContainsKey(enumValue))
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\DecompiledSource\AssemblyResolver.cs (1)
182return _inMemoryImagesForTesting.ContainsKey(reference);
Handler\References\FindUsagesLSPContext.cs (1)
105if (_definitionToId.ContainsKey(definition))
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.SolutionCreator.cs (5)
267if (!oldProjectIdToStateChecksums.ContainsKey(projectId)) 278if (!oldProjectIdToStateChecksums.ContainsKey(projectId)) 309if (!newProjectIdToStateChecksums.ContainsKey(projectId)) 488if (!oldDocumentIdToStateChecksums.ContainsKey(documentId)) 508if (!newDocumentIdToStateChecksums.ContainsKey(documentId))
Host\TestUtils.cs (2)
63var mismatch3 = assetMapFromNewSolution.Where(p => !assetMapFromIncrementalSolution.ContainsKey(p.Key)).ToList(); 66var mismatch4 = assetMapFromIncrementalSolution.Where(p => !assetMapFromNewSolution.ContainsKey(p.Key)).ToList();
Microsoft.CodeAnalysis.Test.Utilities (8)
Assert\AssertEx.cs (1)
388if (!indexes.ContainsKey(expectedItem))
CommonTestBase.cs (1)
139Assert.True(expectedBlobs.ContainsKey(s), "Expecting marshalling blob for " + (isField ? "field " : "parameter ") + s);
Compilation\OperationTreeVerifier.cs (1)
684var labelStr = !(operation.Target.IsImplicitlyDeclared || _labelIdMap.ContainsKey(operation.Target)) ? $", Label: {operation.Target.Name}" : $", Label Id: {GetLabelId(operation.Target)}";
CompilationVerifier.cs (2)
152if (result.ContainsKey(method.FullName)) 344if (readersByName.ContainsKey(name))
Diagnostics\OptionsDiagnosticAnalyzer.cs (1)
38if (_mismatchedOptions.ContainsKey(callerName))
Mocks\TestSourceReferenceResolver.cs (1)
45_sources?.ContainsKey(path) == true ? path : null;
TestableFileSystem.cs (1)
84FileExistsFunc = filePath => map.ContainsKey(filePath),
Microsoft.CodeAnalysis.VisualBasic (5)
Binding\Binder_Imports.vb (1)
235If data.XmlNamespaces.ContainsKey(prefix) Then
Binding\Binder_XmlLiterals.vb (1)
1149If allAttributes.ContainsKey(name) Then
Binding\BlockBaseBinder.vb (1)
50If Not map.ContainsKey(local.Name) Then
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
584If Not _analysis.blockParent.ContainsKey(node) Then
Symbols\Source\SourceFieldSymbol.vb (1)
539If graph.ContainsKey(field) AndAlso IsPartOfCycle(graph, field) Then
Microsoft.CodeAnalysis.Workspaces (31)
Differencing\Match.cs (4)
285if (_oneToTwo.ContainsKey(node1) || _twoToOne.ContainsKey(node2)) 306return _twoToOne.ContainsKey(node2); 320return _oneToTwo.ContainsKey(node1);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
198Contract.ThrowIfFalse(symbolToGroup.ContainsKey(symbol));
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
377if (allAliases.ContainsKey(aliasName))
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
29=> _documentToModifiedSpansMap.ContainsKey(documentId) || _documentToComplexifiedSpansMap.ContainsKey(documentId);
Shared\Utilities\DocumentationComment.cs (3)
258if (!string.IsNullOrWhiteSpace(name) && !_comment._parameterTexts.ContainsKey(name)) 269if (!string.IsNullOrWhiteSpace(name) && !_comment._typeParameterTexts.ContainsKey(name)) 282if (_exceptionTextBuilders == null || !_exceptionTextBuilders.ContainsKey(type))
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
129return _analyzerAssemblyInfoMap.ContainsKey(fullPath);
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
290return _dictionary.ContainsKey(k);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (2)
159if (!symbolsWriteMap.ContainsKey(key)) 225if (!SymbolsWriteBuilder.ContainsKey(symbolAndWrite) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
134if (!other._reachingWrites.ContainsKey(key))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (2)
464Debug.Assert(!previousChangesMap.ContainsKey(currentToken)); 507if (previousChangesMap.ContainsKey(tokenWithIndex.Token))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
400!equivalentTypesWithDifferingAssemblies.ContainsKey(x))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
212if (importToSyntax.ContainsKey(namespaceSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
100var isCollision = collisionMap.ContainsKey(name);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
106if (_documentPathsToDocumentIds.ContainsKey(fullPath)) 165if (_documentPathsToDocumentIds.ContainsKey(fullPath)) 381return _documentPathsToDocumentIds.ContainsKey(fullPath);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
935if (_dynamicFilePathMaps.ContainsKey(dynamicFilePath))
Workspace\Workspace_Editor.cs (6)
171return _projectToOpenDocumentsMap.ContainsKey(projectId); 800Contract.ThrowIfFalse(_bufferToDocumentInCurrentContextMap.ContainsKey(textContainer)); 808Contract.ThrowIfFalse(!_bufferToDocumentInCurrentContextMap.ContainsKey(textContainer)); 812if (isCurrentContext || !_bufferToDocumentInCurrentContextMap.ContainsKey(textContainer)) 826Contract.ThrowIfFalse(!_bufferToDocumentInCurrentContextMap.ContainsKey(textContainer)); 830Contract.ThrowIfFalse(_bufferToDocumentInCurrentContextMap.ContainsKey(textContainer));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
238if (_projectIdToFileInfoMap.ContainsKey(projectId))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
290return _dictionary.ContainsKey(k);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace`1.cs (1)
653Assert.False(projectNameToTestHostProject.ContainsKey(project.Name), $"The workspace XML already contains a project with name {project.Name}");
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Remote\ServiceDescriptorTests.cs (1)
77if (types.ContainsKey(type))
Microsoft.Data.Analysis (1)
DataFrameColumnCollection.cs (1)
85if (_columnNameToIndexDictionary.ContainsKey(column.Name))
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
69if (runtimeItems.ContainsKey(runtimeName))
Microsoft.DotNet.Build.Tasks.Packaging (18)
GeneratePackageReport.cs (6)
229if (!_frameworks.ContainsKey(fileFramework)) 241if (!_frameworks.ContainsKey(inboxFramework)) 272if (!_frameworks.ContainsKey(derivedFx)) 301if (!packageItems.ContainsKey(packageId)) 324if (_targetPathToPackageItem.ContainsKey(packageSpecificTargetPath)) 342if (packageItems.Any() && packageItems.ContainsKey(PackageId))
GetApplicableAssetsFromPackages.cs (2)
161if (!_packageToPackageItems.ContainsKey(packageItem.Package)) 183if (_targetPathToPackageItem.ContainsKey(packageSpecificTargetPath))
GetLayoutFiles.cs (1)
92if (!packageReport.SupportedFrameworks.ContainsKey(fx.ToString()))
GetSupportedPackagesFromPackageReports.cs (1)
31var supportedTargets = report.Targets.Values.Where(target => report.SupportedFrameworks.ContainsKey(target.Framework));
NuGetAssetResolver.cs (1)
177if (!_packages.ContainsKey(packageId))
PackageIndex.cs (1)
779if (!packageToMetaPackage.ContainsKey(metaPackage.Key))
ValidateFrameworkPackage.cs (1)
71var missingInboxAssemblies = _index.Packages.Where(packageInfo => packageInfo.Value.InboxOn.IsAnyVersionInbox(fx) && !testAssetsByName.ContainsKey(packageInfo.Key));
ValidatePackage.cs (4)
330if (implementationFiles.ContainsKey(fileName)) 479if (_frameworks.ContainsKey(fx)) 592if (!_frameworks.ContainsKey(inboxPair.Key)) 629if (!_frameworks.ContainsKey(framework))
ValidationTask.cs (1)
74return _suppressions.ContainsKey(key);
Microsoft.DotNet.Build.Tasks.Workloads (5)
CreateVisualStudioWorkload.wix.cs (5)
153if (!_supportsMachineArch.ContainsKey(manifestPackage.SdkFeatureBand)) 248if (!buildData.ContainsKey(sourcePackage)) 259if (!buildData[sourcePackage].FeatureBands.ContainsKey(platform)) 266if (!packsInWorkloadByPlatform.ContainsKey(platform)) 297if (!groupPackage.ManifestsPerPlatform.ContainsKey(platform))
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\PinvokeAnalyzer.cs (2)
111if (AllowedPinvokes.ContainsKey(methodName)) 130return (ExceptionPinvokes.ContainsKey(methodName) && ExceptionPinvokes[methodName].Equals(moduleName, StringComparison.OrdinalIgnoreCase));
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetVersionUpdater.cs (1)
234if (packages.ContainsKey(packageId))
Microsoft.DotNet.PackageTesting (3)
GetCompatiblePackageTargetFrameworks.cs (2)
67if (packageTfmMapping.ContainsKey(item)) 97if (packageTfmMapping.ContainsKey(forwardTfm))
VerifyClosure.cs (1)
154return ignoredReferences.ContainsKey(moduleReference);
Microsoft.DotNet.SharedFramework.Sdk (1)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
154return ignoredReferences.ContainsKey(moduleReference);
Microsoft.DotNet.SignCheckLibrary (1)
Verification\SignatureVerificationManager.cs (1)
200if (_fileVerifiers.ContainsKey(extension))
Microsoft.DotNet.SignTool (3)
src\Configuration.cs (1)
320if (!_hashToCollisionIdMap.ContainsKey(signedFileContentKey))
src\SignToolTask.cs (2)
400if (map.ContainsKey(extension)) 460if (map.ContainsKey(publicKeyToken))
Microsoft.DotNet.VersionTools (3)
Automation\VersionsRepoUpdater.cs (1)
67if (!packages.ContainsKey(package.Key))
BuildInfo.cs (1)
183if (packages.ContainsKey(id))
Dependencies\BuildOutput\FileRegexPackageUpdater.cs (1)
20.FirstOrDefault(d => d.RawPackages.ContainsKey(PackageId));
Microsoft.DotNet.XliffTasks (2)
Model\XlfDocument.cs (2)
81if (nodesById.ContainsKey(node.Id)) 182if (!nodesById.ContainsKey(sourceNode.Id))
Microsoft.Extensions.Compliance.Redaction (1)
RedactorProvider.cs (1)
40if (!map.ContainsKey(DataClassification.None))
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
316return _properties.ContainsKey(key);
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
151if (switchMappingsCopy.ContainsKey(mapping.Key))
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
76if (data.ContainsKey(key))
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationFileParser.cs (1)
101if (_data.ContainsKey(key))
Microsoft.Extensions.Configuration.Xml (1)
XmlStreamConfigurationProvider.cs (1)
400if (configuration.ContainsKey(key))
Microsoft.Extensions.DependencyInjection (4)
ServiceLookup\CallSiteChain.cs (1)
22if (_callSiteChain.ContainsKey(serviceIdentifier))
ServiceLookup\CallSiteFactory.cs (3)
671if (_descriptorLookup.ContainsKey(serviceIdentifier)) 676if (serviceIdentifier.ServiceKey != null && _descriptorLookup.ContainsKey(new ServiceIdentifier(KeyedService.AnyKey, serviceType))) 685return genericDefinition == typeof(IEnumerable<>) || _descriptorLookup.ContainsKey(serviceIdentifier.GetGenericTypeDefinition());
Microsoft.Extensions.Diagnostics (1)
Metrics\ListenerSubscription.cs (1)
53if (_instruments.ContainsKey(instrument))
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Linux\Resources\HardcodedValueFileSystem.cs (1)
33return _fileContent.ContainsKey(fileInfo.FullName);
Microsoft.Extensions.Logging.Generators (8)
LoggerMessageGenerator.Parser.cs (8)
400if (lp.IsLogger && lm.TemplateMap.ContainsKey(paramName)) 405else if (lp.IsException && lm.TemplateMap.ContainsKey(paramName)) 410else if (lp.IsLogLevel && lm.TemplateMap.ContainsKey(paramName)) 415else if (lp.IsLogLevel && level != null && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey(lp.CodeName)) 419else if (lp.IsTemplateParameter && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey($"@{paramName}") && !lm.TemplateMap.ContainsKey(lp.CodeName))
Microsoft.Interop.SourceGeneration (1)
ManualTypeMarshallingHelper.cs (1)
222|| modes.ContainsKey(marshalMode))
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (2)
413if (result.ContainsKey(identifier)) 449if (result.ContainsKey(identifier))
Microsoft.Maui.Controls (34)
AnimationExtensions.cs (4)
119 if (!s_animations.ContainsKey(key) && !s_kinetics.ContainsKey(key)) 204 return s_animations.ContainsKey(key); 229 while (s_animations.ContainsKey(key))
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (1)
276 if (_sectionRenderers.ContainsKey(renderer.ViewController))
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (1)
473 if (viewController == null && _trackers.ContainsKey(page))
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (4)
286 if (_renderers.ContainsKey(item)) 353 if (!_renderers.ContainsKey(newContent)) 430 if (!sectionItems.Contains(oldContent) && _renderers.ContainsKey(oldContent)) 532 if (_renderers.ContainsKey(newItem))
Compatibility\Handlers\TableView\iOS\TableViewModelRenderer.cs (2)
63 if (!_headerCells.ContainsKey((int)section)) 75 if (!_headerCells.ContainsKey((int)section))
DragAndDrop\DataPackagePropertySet.cs (1)
40 public bool ContainsKey(string key) => _propertyBag.ContainsKey(key);
Internals\NameScope.cs (2)
25 if (_names.ContainsKey(name)) 55 if (!_names.ContainsKey(name))
MessagingCenter.cs (3)
205 if (!_subscriptions.ContainsKey(key)) 232 if (_subscriptions.ContainsKey(key)) 251 if (!_subscriptions.ContainsKey(key))
OrderedDictionary.cs (2)
179 return _dict.ContainsKey(key); 193 if (!_dict.ContainsKey(key))
Platform\GestureManager\GesturePlatformManager.iOS.cs (1)
611 if (_gestureRecognizers.ContainsKey(recognizer))
PlatformConfigurationRegistry.cs (1)
22 if (_platformSpecifics.ContainsKey(typeof(T)))
Registrar.cs (2)
240 !(visualRenderers.ContainsKey(visualType) || 241 visualRenderers.ContainsKey(_defaultVisualType)))
ResourceDictionary.cs (2)
208 return _innerDictionary.ContainsKey(key); 216 if (_innerDictionary.ContainsKey(index))
ResourcesExtensions.cs (2)
23 if (!resources.ContainsKey(res.Key) && ve.Resources.TryGetValue(res.Key, out object value)) 38 if (!resources.ContainsKey(res.Key))
Shell\ShellNavigationManager.cs (1)
330 if (!returnValue.ContainsKey(datum.Key))
Shell\ShellNavigationQueryParameters.cs (2)
77 public bool Contains(KeyValuePair<string, object> item) => _internal.ContainsKey(item.Key); 79 public bool ContainsKey(string key) => _internal.ContainsKey(key);
Shell\ShellRouteParameters.cs (2)
79 if (this.ContainsKey(item.Key)) 96 if (!this.ContainsKey(item.Key))
TypeConversionHelper.cs (1)
76 type != typeof(string) && !BindableProperty.SimpleConvertTypes.ContainsKey(type);
Microsoft.Maui.Controls.Build.Tasks (22)
CompiledConverters\FontSizeTypeConverter.cs (1)
31 if (parent != null && context.Variables.ContainsKey(parent))
CompiledMarkupExtensions\StaticResourceExtension.cs (3)
34 && context.Variables.ContainsKey(irn) 55 && context.Variables.ContainsKey(irn2) 80 && context.Variables.ContainsKey(irn3)
CompiledMarkupExtensions\TypeExtension.cs (1)
25 if (!node.Properties.ContainsKey(name))
CreateObjectVisitor.cs (7)
132 if (node.Properties.ContainsKey(XmlName.xArguments) && !node.Properties.ContainsKey(XmlName.xFactoryMethod)) 142 else if (node.Properties.ContainsKey(XmlName.xFactoryMethod)) 233 else if (ctorInfo != null && node.Properties.ContainsKey(XmlName.xArguments) && 234 !node.Properties.ContainsKey(XmlName.xFactoryMethod) && ctorInfo.MatchXArguments(node, typeref, Module, Context)) 286 if (!enode.Properties.ContainsKey(new XmlName("", propname))) 326 if (!enode.Properties.ContainsKey(XmlName.xArguments))
MethodDefinitionExtensions.cs (1)
11 if (!enode.Properties.ContainsKey(XmlName.xArguments))
NodeILExtensions.cs (1)
476 if (en != null && context.Variables.ContainsKey(en))
SetPropertiesVisitor.cs (4)
59 if (!Context.Variables.ContainsKey((IElementNode)parentNode)) 304 bool hasSource = node.Properties.ContainsKey(new XmlName("", "Source")); 1651 if (node.Properties.ContainsKey(XmlName.xKey)) 1704 if (node.Properties.ContainsKey(XmlName.xKey))
SetResourcesVisitor.cs (4)
54 && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey)) 58 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey)) 86 && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey)) 90 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
Microsoft.Maui.Controls.Compatibility (3)
iOS\EventTracker.cs (1)
599 if (_gestureRecognizers.ContainsKey(recognizer))
iOS\Renderers\TableViewModelRenderer.cs (2)
42 if (!_headerCells.ContainsKey((int)section)) 52 if (!_headerCells.ContainsKey((int)section))
Microsoft.Maui.Controls.Xaml (16)
ApplyPropertiesVisitor.cs (3)
138 && node.Properties.ContainsKey(XmlName.xKey)) 200 if (xpe == null && node.Properties.ContainsKey(XmlName.xKey)) 349 var xKey = node is IElementNode eNode && eNode.Properties.ContainsKey(XmlName.xKey) ? ((ValueNode)eNode.Properties[XmlName.xKey]).Value as string : null;
CreateValuesVisitor.cs (5)
67 else if (node.Properties.ContainsKey(XmlName.xArguments) || node.Properties.ContainsKey(XmlName.xFactoryMethod)) 219 if (!node.Properties.ContainsKey(new XmlName("", propname))) 245 if (!node.Properties.ContainsKey(XmlName.xFactoryMethod)) 286 if (!enode.Properties.ContainsKey(XmlName.xArguments))
FillResourceDictionariesVisitor.cs (4)
61 && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey)) 65 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey)) 84 && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey)) 88 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
SimplifyTypeExtensionVisitor.cs (1)
61 if (node.Properties.ContainsKey(typeNameXmlName)
XamlParser.cs (3)
79 if (node.Properties.ContainsKey(name)) 94 if (node.Properties.ContainsKey(XmlName.xArguments)) 105 if (node.Properties.ContainsKey(XmlName._CreateContent))
Microsoft.Maui.Resizetizer (2)
ResizetizeImages.cs (1)
140 if (imagesPairs.ContainsKey(image.OutputName))
TizenSplashUpdater.cs (1)
50 if (splashDpiMap.ContainsKey((resolution, orientation)))
Microsoft.ML.AutoML (4)
Experiment\SuggestedTrainer.cs (1)
84if (spMap.ContainsKey(hp.Name))
TrainerExtensions\TrainerExtensionUtil.cs (1)
284if (enumDict.ContainsKey("Auto"))
Tuner\CostFrugalTuner.cs (1)
87int threadId = _trialProposedBy.ContainsKey(trialId) ? _trialProposedBy[trialId] : _currentThreadId;
Tuner\PipelineProposer.cs (1)
212if (_estimatorCost.ContainsKey(estimatorType))
Microsoft.ML.Core (10)
CommandLine\CmdParser.cs (3)
499if (map.ContainsKey(name.ToLowerInvariant())) 505if (map.ContainsKey(nick.ToLowerInvariant())) 532Contracts.Assert(map.ContainsKey(name) && map[name] == def);
ComponentModel\ComponentCatalog.cs (2)
577if (_entryPointMap.ContainsKey(entryPointInfo.Name)) 629if (_componentMap.ContainsKey(tag))
Data\RoleMappedSchema.cs (1)
238=> _map.ContainsKey(role.Value);
Environment\HostEnvironmentBase.cs (1)
588if (Options.ContainsKey(name))
Utilities\LruCache.cs (1)
64Contracts.Assert(!_cache.ContainsKey(key));
Utilities\Tree.cs (2)
116return _children.ContainsKey(key); 164Contracts.Assert(_parent._children.ContainsKey(Key));
Microsoft.ML.Core.Tests (10)
UnitTests\ColumnTypes.cs (10)
34if (dict.ContainsKey(tmp) && dict[tmp] != tmp.ToString()) 40if (dict.ContainsKey(tmp1) && dict[tmp1] != tmp1.ToString()) 46if (dict.ContainsKey(tmp2) && dict[tmp2] != tmp2.ToString()) 61if (dict.ContainsKey(tmp) && dict[tmp] != tmp.ToString()) 67if (dict.ContainsKey(tmp1) && dict[tmp1] != tmp1.ToString()) 73if (dict.ContainsKey(tmp2) && dict[tmp2] != tmp2.ToString()) 81if (dict.ContainsKey(tmp) && dict[tmp] != tmp.ToString()) 87if (dict.ContainsKey(tmp1) && dict[tmp1] != tmp1.ToString()) 93if (dict.ContainsKey(tmp2) && dict[tmp2] != tmp2.ToString()) 106if (dict.ContainsKey(tmp4))
Microsoft.ML.Data (45)
Commands\DataCommand.cs (2)
172if (averageMetric.ContainsKey(nameOfMetric)) 183if (averageMetric.ContainsKey(nameOfMetric))
Data\Conversion.cs (3)
548Contracts.Assert(_tryParseDelegates.ContainsKey(typeDst.RawType)); 668Contracts.Assert(_isDefaultDelegates.ContainsKey(t.RawType)); 691Contracts.Assert(_hasZeroDelegates.ContainsKey(t.RawType));
Data\DataViewTypeManager.cs (6)
113if (_rawTypeToDataViewTypeMap.ContainsKey(rawType)) 130if (_dataViewTypeToRawTypeMap.ContainsKey(dataViewType)) 186if (_rawTypeToDataViewTypeMap.ContainsKey(rawType) && _rawTypeToDataViewTypeMap[rawType].Equals(dataViewType) && 187_dataViewTypeToRawTypeMap.ContainsKey(dataViewType) && _dataViewTypeToRawTypeMap[dataViewType].Equals(rawType)) 191if (_rawTypeToDataViewTypeMap.ContainsKey(rawType) && !_rawTypeToDataViewTypeMap[rawType].Equals(dataViewType)) 201if (_dataViewTypeToRawTypeMap.ContainsKey(dataViewType) && !_dataViewTypeToRawTypeMap[dataViewType].Equals(rawType))
Data\SchemaDefinition.cs (1)
262if (AnnotationInfos.ContainsKey(kind))
DataLoadSave\Binary\CodecFactory.cs (3)
88Contracts.Assert(!_loadNameToCodecCreator.ContainsKey(codec.LoadName)); 89Contracts.Assert(!_simpleCodecTypeMap.ContainsKey(codec.Type.RawType)); 96Contracts.Assert(!_loadNameToCodecCreator.ContainsKey(name));
DataLoadSave\Database\DatabaseLoader.cs (1)
489if (iinfo == nameToInfoIndex.Count && nameToInfoIndex.ContainsKey(name))
DataLoadSave\Text\TextLoader.cs (1)
765if (iinfo == nameToInfoIndex.Count && nameToInfoIndex.ContainsKey(name))
EntryPoints\EntryPointNode.cs (5)
367if (_vars.ContainsKey(newName)) 369if (!_vars.ContainsKey(oldName)) 635if (!_inputBindingMap.ContainsKey(inputName)) 659if (!_inputBindingMap.ContainsKey(inputName)) 959if (InputBindingMap.ContainsKey(uniqueName))
Evaluators\AnomalyDetectionEvaluator.cs (1)
602Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Evaluators\BinaryClassifierEvaluator.cs (6)
825Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics)); 873Host.Assert(resultDict.ContainsKey(MetricKinds.PrCurve)); 875Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics)); 952Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics)); 998Host.Assert(resultDict.ContainsKey(MetricKinds.PrCurve)); 1000Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Evaluators\ClusteringEvaluator.cs (1)
82Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Evaluators\EvaluatorUtils.cs (5)
70Contracts.Assert(map.ContainsKey(kind)); 93return map.ContainsKey(tmp.ToString()); 488if (!slotNames.ContainsKey(name)) 588if (!reconciledKeyNames.ContainsKey(name)) 874if (!firstDvKeyNoNamesColumns.ContainsKey(name))
Evaluators\MulticlassClassificationEvaluator.cs (1)
563Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Evaluators\RankingEvaluator.cs (1)
265Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Evaluators\RegressionEvaluator.cs (1)
184Host.Assert(resultDict.ContainsKey(MetricKinds.OverallMetrics));
Model\Pfa\BoundPfaContext.cs (1)
263if (_nameToVarName.ContainsKey(name))
Transforms\ColumnBindingsBase.cs (1)
331if (_nameToInfoIndex.ContainsKey(name))
Transforms\NAFilter.cs (2)
111if (_srcIndexToInfoIndex.ContainsKey(index)) 147if (_srcIndexToInfoIndex.ContainsKey(index))
Transforms\ValueMapping.cs (3)
326if (!keyTypeValueMapping.ContainsKey(value)) 889if (_mapping.ContainsKey(key)) 898if (_mapping.ContainsKey(key))
Microsoft.ML.FastTree (10)
Dataset\Dataset.cs (3)
821partsDatas[p] = parts[p].AuxiliaryData.ContainsKey(name) ? parts[p].AuxiliaryData[name] : default(DatasetSkeletonQueryDocData); 887if (!AuxiliaryData.ContainsKey(name)) 900if (AuxiliaryData.ContainsKey(SampleWeightsSetName))
GamModelParameters.cs (2)
156Host.CheckDecode(!_inputFeatureToShapeFunctionMap.ContainsKey(key)); 814Contracts.Assert(context._pred._inputFeatureToShapeFunctionMap.ContainsKey(index)
Training\ScoreTracker.cs (2)
147if (_treeMultiplierMap.ContainsKey(t)) 149if (_treeMultiplierMap[t].ContainsKey(k))
TreeEnsemble\InternalRegressionTree.cs (2)
1201if (!featureToId.ContainsKey(SplitFeatures[n])) 1281if (!featureToId.ContainsKey(categoricalSplitFeature))
TreeEnsemble\InternalTreeEnsemble.cs (1)
335int outputInputId = featureToID.ContainsKey(pair.Key) ? featureToID[pair.Key] : 0;
Microsoft.ML.GenAI.Core (2)
Extension\ModuleExtension.cs (1)
180var remainingLayerSizeMap = layerSizeMap.Where(x => !deviceMap.ContainsKey(x.Key)).ToDictionary(x => x.Key, x => x.Value);
Utility\Cache.cs (1)
35if (this.ContainsKey(layerIndex))
Microsoft.ML.IntegrationTests (1)
Common.cs (1)
49Assert.True(types.ContainsKey(column.Name));
Microsoft.ML.LightGbm (5)
LightGbmArguments.cs (1)
187var name = NameMapping.ContainsKey(field.Name) ? NameMapping[field.Name] : LightGbmInterfaceUtils.GetOptionName(field.Name);
LightGbmTrainerBase.cs (3)
69if (NameMapping.ContainsKey(name)) 399if (modelParameters.ContainsKey(lightGbmName)) 704ch.Assert(((ITrainer)this).PredictionKind != PredictionKind.MulticlassClassification || GbmOptions.ContainsKey("num_class"),
WrappedLightGbmTraining.cs (1)
47ch.Assert(parameters.ContainsKey("metric"));
Microsoft.ML.OnnxConverter (3)
OnnxContextImpl.cs (3)
66public override bool ContainsColumn(string colName) => _columnNameMap.ContainsKey(colName); 192_host.Assert(_columnNameMap.ContainsKey(colName)); 205if (_columnNameMap.ContainsKey(colName))
Microsoft.ML.OnnxTransformer (1)
OnnxUtils.cs (1)
581if (!_typeToKindMap.ContainsKey(type))
Microsoft.ML.Predictor.Tests (2)
CompareBaselines.cs (2)
77if (!names2.ContainsKey(nameLower)) 100if (!names2.ContainsKey(nameLower))
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
914if (foldResults.ContainsKey(thisFoldResults.Key))
Microsoft.ML.TimeSeries (8)
RootCauseAnalyzer.cs (8)
108if (!dimPointMapping.ContainsKey(point.Dimension)) 159if (anomalyTree.ChildrenNodes.ContainsKey(dimension.DimensionKey)) 301if (pointChildren.ContainsKey(dimKey)) 305if (anomalyChildren.ContainsKey(dimKey)) 403if (dimPointMapping.ContainsKey(dimension)) 465if (!tree.ChildrenNodes.ContainsKey(nextDim)) 711if (!distribution.ContainsKey(dimVal)) 726if (!bigDictionary.ContainsKey(item.Key) || !object.Equals(bigDictionary[item.Key], smallDictionary[item.Key]))
Microsoft.ML.Tokenizers (5)
Model\EnglishRobertaTokenizer.cs (3)
1221public bool Contains(string symbol) => symbol != null && _stringSymbolToIndexMapping.ContainsKey(symbol); 1223public bool Contains(int id) => _idToIndex.ContainsKey(id); 1226public int IndexOf(int id) => _idToIndex.ContainsKey(id) ? _idToIndex[id] : UnkIndex;
Model\WordPieceTokenizer.cs (1)
351Debug.Assert(_vocabReverse.ContainsKey(id));
Utils\ByteToUnicodeEncoding.cs (1)
28if (!byteToUnicodeMapping.ContainsKey((char)b))
Microsoft.ML.TorchSharp (9)
AutoFormerV2\Attention.cs (1)
81if (!attentionOffsets.ContainsKey(offset))
NasBert\Modules\IncrementalState.cs (1)
71return incrementalState?.ContainsKey(fullKey) == true ? incrementalState[fullKey] : EmptyIncrementalState;
NasBert\Modules\MultiHeadAttention.cs (4)
182if (savedState.ContainsKey(PrevKeyKey) && savedState.ContainsKey(PrevValueKey) && staticKv) 219if (savedState.ContainsKey(PrevKeyKey)) 227if (savedState.ContainsKey(PrevValueKey))
Roberta\QATrainer.cs (2)
416if (!mapping.ContainsKey(answerIndex) || !mapping.ContainsKey(answerEnd))
Utils\DefaultDictionary.cs (1)
91return _dictionary.ContainsKey(key);
Microsoft.ML.Transforms (7)
Dracula\CMCountTable.cs (1)
286if (!_tables[labelKey][i].ContainsKey(idx))
Dracula\DictCountTable.cs (1)
83env.CheckDecode(!Tables[iTable].ContainsKey(key));
Text\TextNormalizing.cs (1)
420if (CombinedDiacriticsMap.ContainsKey(ch))
Text\WordEmbeddingsExtractor.cs (4)
625if (_modelsMetaData.ContainsKey(kind)) 628if (_linesToSkipInModels.ContainsKey(kind)) 656if (_vocab.ContainsKey(_modelFileNameWithPath) && _vocab[_modelFileNameWithPath] != null) 667if (_vocab.ContainsKey(_modelFileNameWithPath) && _vocab[_modelFileNameWithPath] != null)
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\Collection.vb (2)
58Debug.Assert(m_KeyedNodesHash.ContainsKey(Key), "We got an argumentexception from a hashtable add, but it wasn't a duplicate key.") 150Return m_KeyedNodesHash.ContainsKey(Key)
Microsoft.VisualStudio.LanguageServices (9)
GenerateType\GenerateTypeDialogViewModel.cs (2)
88Debug.Assert(_accessListMap.ContainsKey(SelectedAccessibilityString), "The Accessibility Key String not present"); 139Debug.Assert(_typeKindMap.ContainsKey(SelectedTypeKindString), "The TypeKind Key String not present");
Interop\CleanableWeakComHandleTable.cs (3)
127Debug.Assert(_table.ContainsKey(key), "Key not found in table."); 153if (_table.ContainsKey(key)) 187return _table.ContainsKey(key);
Telemetry\CodeMarkerLogger.cs (2)
150=> s_map.ContainsKey(functionId) || s_blockMap.ContainsKey(functionId);
Utilities\VsCodeWindowViewTracker.cs (1)
62if (!_trackedTextViews.ContainsKey(pTextView))
Workspace\SourceGeneratedFileManager.cs (1)
112if (!_directoryInfoOnDiskByContainingDirectoryId.ContainsKey(document.Id.Id))
MSBuildTaskHost (1)
Immutable\ImmutableDictionary.cs (1)
74return _backing.ContainsKey(key);
PresentationBuildTasks (9)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
190Debug.Assert(targetOutputs.ContainsKey(CompileTargetName)); 305Debug.Assert(targetOutputs.ContainsKey(CompileTargetName));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (1)
1477if (bracketCharacterCache != null && bracketCharacterCache.ContainsKey(propertyName))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (1)
198if (!MasterBracketCharacterCache.ContainsKey(type))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (1)
394if (_compatTable.ContainsKey(oldXmlns) &&
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (4)
864return (_subsumingNamespaces is null ? false : _subsumingNamespaces.ContainsKey(namespaceName)); 891return (_knownNamespaces is null ? false : _knownNamespaces.ContainsKey(namespaceName)); 1782return _ignorables is not null && _ignorables.ContainsKey(namespaceName); 1979return _all || (_names is not null && _names.ContainsKey(itemName));
PresentationCore (28)
MS\Internal\Automation\EventMap.cs (1)
114if ((eventObject != null) && (!_eventsTable.ContainsKey(eventObject.Id)))
MS\Internal\DeferredElementTreeState.cs (4)
16if(!_oldCoreParents.ContainsKey(element)) 26if(treeState != null && treeState._oldCoreParents.ContainsKey(element)) 77if(!_oldLogicalParents.ContainsKey(element)) 87if(treeState != null && treeState._oldLogicalParents.ContainsKey(element))
MS\Internal\FontCache\FontResourceCache.cs (2)
137if (!folderResourceMap.ContainsKey(folderName)) 141Debug.Assert(!folderResourceMap.ContainsKey(resourceFullName));
MS\Internal\FontFace\CompositeFontInfo.cs (1)
59else if (!_familyMapRangesByLanguage.ContainsKey(familyMap.Language))
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
49if (!convertedDictionary.ContainsKey(language))
MS\Internal\Ink\Renderer.cs (1)
435if (_visuals.ContainsKey(stroke))
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
854if (adjInformation.ContainsKey(edge))
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SizeLimitedCache.cs (3)
99if (!_nodeLookup.ContainsKey(key)) 160if (!_nodeLookup.ContainsKey(key)) 196if (!_nodeLookup.ContainsKey(key))
System\Windows\Input\Stylus\Common\StylusLogic.cs (1)
407if (!_transformToDeviceMatrices.ContainsKey(hwndSource.CompositionTarget.CurrentDpiScale))
System\Windows\Input\Stylus\Wisp\WispLogic.cs (3)
3001if (__stylusDeviceMap.ContainsKey(stylusDeviceId)) 3019Debug.Assert(__stylusDeviceMap.ContainsKey(stylusDevice.Id)); 3133if (__penContextsMap.ContainsKey(inputSource))
System\Windows\Media\FontEmbeddingManager.cs (1)
56if (_collectedGlyphTypefaces.ContainsKey(glyphTypeface))
System\Windows\Media\HostVisual.cs (1)
245&& !_connectedChannels.ContainsKey(channel))
System\Windows\Media\SolidColorBrush.cs (2)
268return revDictionary.ContainsKey(value); 273return fwdDictionary.ContainsKey(key);
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
400return _specialCharacters.ContainsKey(c);
System\Windows\Media\Visual.cs (4)
830if (!channelsToCyclicBrushMap.ContainsKey(channel)) 861if (!cyclicBrushToChannelsMap.ContainsKey(cyclicBrush)) 893Debug.Assert(cyclicBrushToChannelsMap.ContainsKey(cyclicBrush)); 916Debug.Assert(channelsToCyclicBrushMap.ContainsKey(channel));
System\Windows\Media3D\Visual3DCollection.cs (1)
551Debug.Assert(!duplicates.ContainsKey(visual), "How did the visual get re-inserted?");
PresentationFramework (46)
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (1)
118if (!s_ZRanges.ContainsKey(level))
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (2)
75if (!_attachedAnnotations.ContainsKey(attachedAnnotation)) 212if (!_attachedAnnotations.ContainsKey(attachedAnnotation))
MS\Internal\Annotations\ObservableDictionary.cs (1)
94return _nameValues.ContainsKey(key);
MS\Internal\Annotations\XmlElementCollection.cs (3)
146Invariant.Assert(_xmlDocsRefCounts.ContainsKey(element.OwnerDocument), "Not registered on XmlElement"); 176if (!_xmlDocsRefCounts.ContainsKey(element.OwnerDocument)) 206Invariant.Assert(_xmlDocsRefCounts.ContainsKey(sender as XmlDocument), "Not expecting a notification from this sender");
MS\Internal\AppModel\ResourceContainer.cs (1)
297if (_registeredResourceManagers.ContainsKey(key))
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (1)
423if (_cachedXmlElements.ContainsKey(token))
MS\Internal\Data\CommitManager.cs (1)
170if (!ContainsKey(item))
MS\Internal\Globalization\BamlResourceDeserializer.cs (2)
354if (_propertyInheritanceTreeStack.ContainsKey(propertyName)) 378if (_propertyInheritanceTreeStack.ContainsKey(propertyName))
MS\Internal\Globalization\BamlTreeMap.cs (3)
452if (_classAttributeTable.ContainsKey(className)) 483if (_propertyAttributeTable.ContainsKey(fullName)) 518if (_classAttributeTable.ContainsKey(className))
MS\Internal\Ink\ClipboardProcessor.cs (1)
269if ( !preferredData.ContainsKey(format) )
MS\Internal\IO\Packaging\XamlFilter.cs (1)
845if (_lcidDictionary.ContainsKey(languageString))
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
128return CustomTypeToAbiTypeNameMappings.ContainsKey(type)
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
391if (_predefinedNamespaces.ContainsKey(name))
System\Windows\Controls\DataGrid.cs (1)
6815if (!_editingCellAutomationValueHolders.ContainsKey(cell.Column))
System\Windows\Controls\DataGridColumnCollection.cs (4)
496if (assignedDisplayIndexMap.ContainsKey(currentColumnDisplayIndex)) 524while (assignedDisplayIndexMap.ContainsKey(nextAvailableColumnIndex)) 543Debug.Assert(assignedDisplayIndexMap.ContainsKey(displayIndex)); 1485if (_originalWidthsForResize.ContainsKey(column))
System\Windows\Controls\Primitives\Selector.cs (1)
2763return _set.ContainsKey(e);
System\Windows\Documents\FixedDSBuilder.cs (1)
47if (!_nameHashTable.ContainsKey(Name))
System\Windows\Documents\FixedTextContainer.cs (1)
465if (highlights.ContainsKey(page))
System\Windows\Documents\HighlightVisual.cs (1)
79if (_panel.Highlights.ContainsKey(_page))
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerCreationHelper.cs (1)
77if (!_instances.ContainsKey(language))
System\Windows\Documents\Speller.cs (2)
323if (UriMap.ContainsKey(uri)) 352if (!UriMap.ContainsKey(uri))
System\Windows\Documents\WinRTSpellerInterop.cs (2)
275if(!_spellCheckers.ContainsKey(culture)) 465if (!_customDictionaryFiles.ContainsKey(ietfLanguageTag))
System\Windows\Markup\BamlReader.cs (2)
2661if(_reverseXmlnsTable.ContainsKey(fullName)) 2680if (_reverseXmlnsTable.ContainsKey(fullName))
System\Windows\Markup\MarkupExtensionParser.cs (1)
1477if (bracketCharacterCache != null && bracketCharacterCache.ContainsKey(propertyName))
System\Windows\Markup\ParserContext.cs (1)
198if (!MasterBracketCharacterCache.ContainsKey(type))
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
129if (constructorArgumentAttribute != null && constructorArguments.ContainsKey(constructorArgumentAttribute.ArgumentName))
System\Windows\Markup\Primitives\MarkupWriter.cs (2)
824if (!writtenAttributes.ContainsKey(property.Name)) 938if (!writtenAttributes.ContainsKey(dependsOn.Name))
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
44while (currentType != null && !initializedTypes.ContainsKey(currentType))
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
110if (_nsDefinitions != null && _nsDefinitions.ContainsKey(xamlNamespace) ||
System\Windows\Markup\XmlnsCache.cs (1)
394if (_compatTable.ContainsKey(oldXmlns) &&
System\Windows\SystemResources.cs (3)
1071if (!_hwndNotify.ContainsKey(hwndDpiInfo)) 1086return _hwndNotify.ContainsKey(hwndDpiInfo); 1133Debug.Assert(!_hwndNotify.ContainsKey(hwndDpiInfo));
PresentationUI (6)
MS\Internal\Documents\Application\TransactionalPackage.cs (4)
158if (_activeParts.ContainsKey(normalizedPartUri)) 274if (_activeParts.ContainsKey(normalizedPartUri)) 356if (_activeParts.ContainsKey(normalizedPartUri)) 384if (_activeParts.ContainsKey(normalizedPartUri)
MS\Internal\Documents\RightsManagementProvider.cs (2)
690if (!rights.ContainsKey(rmLicense.LicensedUser)) 705if (!rights.ContainsKey(_user))
ReachFramework (33)
packaging\XpsDigitalSignature.cs (5)
329if( !hashTable.ContainsKey( uri )&& !isOptional) 346return( OptionalSignedParts.ContainsKey( contentType ) ); 372if( uriHashTable.ContainsKey( selector.SourceUri ) ) 398if (!uriHashTable.ContainsKey(selector.SourceUri)) 406if (!relHash.ContainsKey(selector.SelectionCriteria))
Packaging\XpsFixedPageReaderWriter.cs (10)
901if (_imageCache.ContainsKey(resourceUri)) 905else if(_fontCache.ContainsKey(resourceUri)) 909else if(_colorContextCache.ContainsKey(resourceUri)) 913else if(_resourceDictionaryCache.ContainsKey(resourceUri)) 917else if(_resourceCache.ContainsKey(resourceUri) ) 1116if (_fontCache.ContainsKey(uri)) 1142if (_colorContextCache.ContainsKey(uri)) 1168if (_resourceDictionaryCache.ContainsKey(uri)) 1281if (_imageCache.ContainsKey(uri)) 1552if( restictedFontRels.ContainsKey(absUri ) )
Packaging\XpsManager.cs (5)
534if (_cachedParts.ContainsKey(uri)) 922if (_contentTypes.ContainsKey(docContentKey)) 945if (_contentTypes.ContainsKey(docContentKey)) 1089if (_contentTypes.ContainsKey(docContentKey)) 1234if (!_contentTypes.ContainsKey(key))
Packaging\XpsResourcePolicy.cs (2)
86if (!_objDict.ContainsKey(serviceType)) 157if (_objDict.ContainsKey(serviceType))
PrintConfig\PrtTicket_Public_Simple.cs (6)
742_setterCache.ContainsKey(CapabilityName.PageMediaSize)) 814if (_setterCache.ContainsKey(CapabilityName.PageMediaSize)) 985_setterCache.ContainsKey(CapabilityName.PageResolution)) 1056if (_setterCache.ContainsKey(CapabilityName.PageResolution)) 1417_setterCache.ContainsKey(feature)) 1437if (_setterCache.ContainsKey(feature))
Serialization\ColorTypeConverter.cs (2)
300if (colorContextTable.ContainsKey(colorContext.GetHashCode())) 311if (!currentPageColorContextTable.ContainsKey(colorContext.GetHashCode()))
Serialization\ImageSourceTypeConverter.cs (3)
181if(!currentPageImageTable.ContainsKey(uriHashCode)) 454if (imageUriHashTable.ContainsKey(_uriHashValue)) 482if (imageCrcTable.ContainsKey(_crc32HashValue))
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
107if (!filesToWrite.ContainsKey(file.FullName))
System.CodeDom (1)
System\CodeDom\CodeNamespaceImportCollection.cs (1)
32if (!_keys.ContainsKey(value.Namespace))
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (1)
193if (controlParameters.ContainsKey(keyString))
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
676if (_activatedParts.ContainsKey(definition)) 740if (!_activatedParts.ContainsKey(definition))
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
197|| dictionary.ContainsKey(partMetadata.Name))
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
372if (_importValues == null || !ImportValues.ContainsKey(definition))
System.ComponentModel.TypeConverter (3)
System\ComponentModel\Design\ServiceContainer.cs (2)
88if (Services.ContainsKey(serviceType)) 125if (Services.ContainsKey(serviceType))
System\ComponentModel\LicenseManager.LicenseInteropHelper.cs (1)
67public bool Contains(string assemblyName) => _savedLicenseKeys.ContainsKey(assemblyName);
System.Composition.Hosting (1)
System\Composition\Hosting\Core\ExportDescriptorRegistry.cs (1)
27if (!_partDefinitions.ContainsKey(exportKey))
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationElement.cs (1)
796Debug.Assert(!s_perTypeValidators.ContainsKey(type));
System.Data.Common (12)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
484if (!firstKey || !parsetable.ContainsKey(realkeyname)) 581if (!firstKey || !parsetable.ContainsKey(realkeyname))
System\Data\Common\DbConnectionOptions.cs (4)
46_hasPasswordKeyword = (_parsetable.ContainsKey(KEY.Password) || _parsetable.ContainsKey(SYNONYM.Pwd)); 47_hasUserIdKeyword = (_parsetable.ContainsKey(KEY.User_ID) || _parsetable.ContainsKey(SYNONYM.UID));
System\Data\Common\DbConnectionStringBuilder.cs (3)
100flag = CurrentValues.ContainsKey(keyword); 302return CurrentValues.ContainsKey(keyword); 376return CurrentValues.ContainsKey(keyword);
System\Data\DataColumnCollection.cs (2)
304while (_columnFromName.ContainsKey(newName)) 862return (!_columnFromName.ContainsKey(name));
System\Data\DataView.cs (1)
1310else if (!_rowViewCache.ContainsKey(row))
System.Data.Odbc (13)
Common\System\Data\Common\DbConnectionOptions.cs (7)
54_hasPasswordKeyword = (_parsetable.ContainsKey(KEY.Password) || _parsetable.ContainsKey(SYNONYM.Pwd)); 55_hasUserIdKeyword = (_parsetable.ContainsKey(KEY.User_ID) || _parsetable.ContainsKey(SYNONYM.UID)); 90return ((_parsetable.ContainsKey(KEY.User_ID) && !string.IsNullOrEmpty(_parsetable[KEY.User_ID])) || (_parsetable.ContainsKey(SYNONYM.UID) && !string.IsNullOrEmpty(_parsetable[SYNONYM.UID]))); 256return _parsetable.ContainsKey(keyword);
Common\System\Data\Common\DBConnectionString.cs (3)
100if (_parsetable.ContainsKey(KEY.Password)) 104if (_parsetable.ContainsKey(KEY.Pwd)) 194return _parsetable.ContainsKey(keyword);
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
484if (!firstKey || !parsetable.ContainsKey(realkeyname)) 581if (!firstKey || !parsetable.ContainsKey(realkeyname))
System\Data\Odbc\OdbcConnectionStringbuilder.cs (1)
189return s_keywords.ContainsKey(keyword) || base.ContainsKey(keyword);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
145if (!_instruments.ContainsKey(instrument))
System.Diagnostics.Process (2)
System\Collections\Specialized\DictionaryWrapper.cs (2)
52return _contents.ContainsKey(item.Key) && _contents[item.Key] == item.Value; 56public bool ContainsKey(string key) => _contents.ContainsKey(key);
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassRecord.cs (1)
51public bool HasMember(string memberName) => ClassInfo.MemberNames.ContainsKey(memberName);
System\Formats\Nrbf\RecordMap.cs (1)
24public bool ContainsKey(SerializationRecordId key) => _map.ContainsKey(key);
System.Formats.Tar (2)
System\Formats\Tar\PaxTarEntry.cs (2)
162bool containsATime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaATime); 163bool containsCTime = _header.ExtendedAttributes.ContainsKey(TarHeader.PaxEaCTime);
System.IO.Packaging (9)
System\IO\Packaging\OrderedDictionary.cs (2)
26public bool Contains(TKey key) => _dictionary.ContainsKey(key); 30if (_dictionary.ContainsKey(key))
System\IO\Packaging\Package.cs (1)
426if (partDictionary.ContainsKey(normalizedPartName))
System\IO\Packaging\PartBasedPackageProperties.cs (1)
383if (_propertyDictionary.ContainsKey(propertyenum))
System\IO\Packaging\XmlCompatibilityReader.cs (3)
809return (_subsumingNamespaces == null ? false : _subsumingNamespaces.ContainsKey(namespaceName)); 835return (_knownNamespaces == null ? false : _knownNamespaces.ContainsKey(namespaceName)); 1626return _ignorables != null && _ignorables.ContainsKey(namespaceName);
System\IO\Packaging\ZipPackage.cs (2)
1471if (!_ignoredItemDictionary.ContainsKey(normalizedPrefixName)) 1486if (!_extensionDictionary.ContainsKey(extension))
System.Linq.Expressions (8)
System\Linq\Expressions\Compiler\CompilerScope.cs (2)
385return refCount > 2 && !_locals.ContainsKey(v); 402Debug.Assert(ShouldCache(v) && !_locals.ContainsKey(v));
System\Linq\Expressions\Compiler\LabelInfo.cs (1)
366return _labels.ContainsKey(target);
System\Linq\Expressions\Compiler\VariableBinder.cs (3)
175if (currentScope.Definitions.ContainsKey(v)) 214if (scope.IsMethod || scope.Definitions.ContainsKey(node)) 243if (scope.Definitions.ContainsKey(node))
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
2793if (!_definedParameters.ContainsKey(node))
System\Linq\Expressions\Interpreter\Utilities.cs (1)
226return _dict.ContainsKey(key);
System.Linq.Parallel (2)
System\Linq\Parallel\Utils\Lookup.cs (2)
98return _dict.ContainsKey(key); 121Debug.Assert(!_dict.ContainsKey(grouping.Key));
System.Net.Http (4)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (1)
33Debug.Assert(!_backward.ContainsKey(item2), "No added item1 should ever have existing item2");
System\Net\Http\HttpRequestOptions.cs (2)
41bool IDictionary<string, object?>.ContainsKey(string key) => Options.ContainsKey(key); 48bool IReadOnlyDictionary<string, object?>.ContainsKey(string key) => Options.ContainsKey(key);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
114bool isQopSpecified = digestResponse.Parameters.ContainsKey(Qop);
System.Net.HttpListener (2)
System\Net\Managed\HttpEndPointListener.cs (2)
352if (prefs.ContainsKey(prefix)) 396if (!prefs.ContainsKey(prefix))
System.Net.Mail (1)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (1)
33Debug.Assert(!_backward.ContainsKey(item2), "No added item1 should ever have existing item2");
System.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
78return dict.ContainsKey(key);
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (1)
77switches?.ContainsKey(kvp.Key) != true)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
1937_dictionary.ContainsKey(item);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
3669if (eventsByName.ContainsKey(evtName)) 4554Debug.Assert(allListeners.ContainsKey(dispatcher.m_Listener), "EventSource has a listener not on the global list.");
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
145if (!encodingInfoList.ContainsKey(codePage))
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
487bool containsKey = ContainsKey(key);
src\System\Attribute.CoreCLR.cs (1)
375if (!types.ContainsKey(attrType))
src\System\RuntimeType.CoreCLR.cs (1)
1198if (csEventInfos.ContainsKey(name))
System.Private.DataContractSerialization (9)
System\Runtime\Serialization\DataContract.cs (1)
1946if (typesChecked.ContainsKey(type))
System\Runtime\Serialization\DataContractSet.cs (3)
353if (!_referencedCollectionTypesDictionary.ContainsKey(genericDictionaryName) && GetReferencedTypes().ContainsKey(genericDictionaryName)) 636return ProcessedContracts.ContainsKey(dataContract);
System\Runtime\Serialization\HybridObjectCache.cs (2)
24if (_objectDictionary.ContainsKey(id)) 53return _referencedObjectDictionary.ContainsKey(id);
System\Runtime\Serialization\Json\JsonClassDataContract.cs (1)
162if (memberTable.ContainsKey(_traditionalClassDataContract.MemberNames[i].Value))
System\Runtime\Serialization\ObjectReferenceStack.cs (1)
91if (_objectDictionary != null && _objectDictionary.ContainsKey(obj))
System\Runtime\Serialization\SchemaImporter.cs (1)
196if (!previousCollectionTypes.ContainsKey(dataContract.OriginalUnderlyingType))
System.Private.Windows.Core (1)
System\Private\Windows\Core\BinaryFormat\Deserializer\Deserializer.cs (1)
333&& (_incompleteDependencies is null || !_incompleteDependencies.ContainsKey(completedId)))
System.Private.Xml (52)
System\Xml\Core\QueryOutputWriter.cs (1)
179_bitsCData!.PushBit(_lookupCDataElems.ContainsKey(_qnameCData));
System\Xml\Core\QueryOutputWriterV1.cs (1)
166_bitsCData.PushBit(_lookupCDataElems.ContainsKey(_qnameCData));
System\Xml\Core\XmlTextWriter.cs (1)
1570Debug.Assert(_nsHashtable.ContainsKey(_nsStack[i].prefix));
System\Xml\Core\XmlWellFormedWriter.cs (1)
1822Debug.Assert(_nsHashtable.ContainsKey(_nsStack[i].prefix));
System\Xml\Dom\XmlNodeReader.cs (2)
1006if (!dict.ContainsKey(string.Empty)) 1014if (!dict.ContainsKey(localName))
System\Xml\Schema\ContentValidator.cs (1)
188public bool Exists(XmlQualifiedName name) => _names.ContainsKey(name);
System\Xml\Schema\DtdParser.cs (3)
816if (!_schemaInfo.Notations.ContainsKey(notationName)) 1277if (!_schemaInfo.Notations.ContainsKey(notationName)) 1312if (!_schemaInfo.Notations.ContainsKey(notationName.Name))
System\Xml\Schema\DtdParserAsync.cs (3)
460if (!_schemaInfo.Notations.ContainsKey(notationName)) 910if (!_schemaInfo.Notations.ContainsKey(notationName)) 945if (!_schemaInfo.Notations.ContainsKey(notationName.Name))
System\Xml\Schema\SchemaCollectionCompiler.cs (2)
781if (!decl.ProhibitedAttributes.ContainsKey(attribute.QualifiedName)) 788if (!decl.AttDefs.ContainsKey(attribute.QualifiedName) && attribute.AttDef != null && attribute.AttDef.Name != XmlQualifiedName.Empty && attribute.AttDef != SchemaAttDef.Empty)
System\Xml\Schema\SchemaInfo.cs (6)
145return _targetNamespaces.ContainsKey(ns); 150return _targetNamespaces.ContainsKey(ns); 165if (!_attributeDecls.TryGetValue(qname, out attdef) && _targetNamespaces.ContainsKey(qname.Namespace)) 218else if (ed.ProhibitedAttributes.ContainsKey(qname)) 307if (!_elementDecls.ContainsKey(entry.Key)) 314if (!_elementDeclsByType.ContainsKey(entry.Key))
System\Xml\Schema\SchemaSetCompiler.cs (2)
857if (!decl.ProhibitedAttributes.ContainsKey(attribute.QualifiedName)) 864if (!decl.AttDefs.ContainsKey(attribute.QualifiedName) && attribute.AttDef != null && attribute.AttDef.Name != XmlQualifiedName.Empty && attribute.AttDef != SchemaAttDef.Empty)
System\Xml\Schema\XdrBuilder.cs (3)
514if (_SchemaInfo.TargetNamespaces.ContainsKey(uri)) 731if (builder._SchemaInfo.ElementDecls.ContainsKey(qname)) 1183if (!builder._SchemaInfo.ElementDecls.ContainsKey(qname))
System\Xml\Schema\XdrValidator.cs (2)
230if (schemaInfo.TargetNamespaces.ContainsKey(context!.Namespace!)) 375if (this.schemaInfo!.TargetNamespaces.ContainsKey(uri))
System\Xml\Schema\XmlSchemaObjectTable.cs (2)
21Debug.Assert(!_table.ContainsKey(name), "XmlSchemaObjectTable.Add: entry already exists"); 101return _table.ContainsKey(name);
System\Xml\Schema\XsdValidator.cs (2)
153if (!SchemaInfo!.TargetNamespaces.ContainsKey(inlineNS)) 623if (SchemaInfo!.TargetNamespaces.ContainsKey(uri) && _nsManager.LookupPrefix(uri) != null)
System\Xml\Serialization\CodeGenerator.cs (2)
131System.Diagnostics.Debug.Assert(_argList != null && _argList.ContainsKey(name)); 1545return _locals.ContainsKey(key) || (parent != null && parent.ContainsKey(key));
System\Xml\Serialization\Compilation.cs (1)
516if (!serializers.ContainsKey(xmlMappings[i].Key!))
System\Xml\Serialization\XmlAttributeOverrides.cs (1)
40else if (members.ContainsKey(member))
System\Xml\Serialization\XmlSerializationILGen.cs (2)
103System.Diagnostics.Debug.Assert(_methodBuilders.ContainsKey(methodName)); 581System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
254Debug.Assert(_idNameFields.ContainsKey(id)); 1793if (!_idNames.ContainsKey(name)) 2791Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); 2865Debug.Assert(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\XPath\XPathDocument.cs (1)
419if (!_idValueMap.ContainsKey(id))
System\Xml\Xsl\QIL\QilVisitor.cs (1)
458if (_visitedRef.ContainsKey(input))
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (1)
724if (_usedPrefixes.ContainsKey(prefix))
System\Xml\Xsl\XPath\XPathBuilder.cs (1)
827return FunctionTable.ContainsKey(localName);
System\Xml\Xsl\Xslt\Compiler.cs (2)
96if (!_moduleOrder.ContainsKey(baseUri)) 164if (!AllGlobalVarPars.ContainsKey(var.Name!))
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (1)
324return FunctionTable.ContainsKey(localName) && localName != "unparsed-entity-uri";
System\Xml\Xsl\Xslt\Scripts.cs (1)
68public bool ContainsKey(string key) => _backingDictionary.ContainsKey(key);
System\Xml\Xsl\Xslt\Stylesheet.cs (1)
95return _compiler.AllGlobalVarPars.ContainsKey(var.Name);
System\Xml\Xsl\Xslt\XsltLoader.cs (1)
1075if (!_compiler.AttributeSets.ContainsKey(setName))
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (1)
337&& (_incompleteDependencies is null || !_incompleteDependencies.ContainsKey(completedId)))
System.Runtime.Serialization.Schema (12)
System\Runtime\Serialization\Schema\CodeExporter.cs (12)
60if (clrNamespace != null && !_clrNamespaces.ContainsKey(clrNamespace)) 104if (!_clrNamespaces.ContainsKey(ns)) 264if (contractNamesInHierarchy.ContainsKey(classContract.XmlName)) 734return (string.IsNullOrEmpty(clrNamespace) && _clrNamespaces.ContainsKey(typeName)); 739if (!_clrNamespaces.ContainsKey(typeName)) 937if (handledContracts.ContainsKey(classDataContract)) 977if (classDataContract.XmlName != pair.Key && !classDataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract) 1464if (ClrNamespaces.ContainsKey(clrNamespace)) 1470if (!ClrNamespaces.ContainsKey(uniqueNamespace)) 1590if (fragments.ContainsKey(nsFragment)) 1596if (!fragments.ContainsKey(uniqueNsFragment)) 1621if (!previousCollectionTypes.ContainsKey(dataContract.OriginalUnderlyingType))
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
182public bool ContainsKey(CoseHeaderLabel key) => _headerParameters.ContainsKey(key);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
126if (!_connectionMapping.ContainsKey(connection))
System.ServiceModel.Syndication (13)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (8)
216if (!category.AttributeExtensions.ContainsKey(s_atom10Term)) 220if (!string.IsNullOrEmpty(category.Label) && !category.AttributeExtensions.ContainsKey(s_atom10Label)) 224if (!string.IsNullOrEmpty(category.Scheme) && !category.AttributeExtensions.ContainsKey(s_atom10Scheme)) 468if (!string.IsNullOrEmpty(link.RelationshipType) && !link.AttributeExtensions.ContainsKey(s_atom10Relative)) 472if (!string.IsNullOrEmpty(link.MediaType) && !link.AttributeExtensions.ContainsKey(s_atom10Type)) 476if (!string.IsNullOrEmpty(link.Title) && !link.AttributeExtensions.ContainsKey(s_atom10Title)) 480if (link.Length != 0 && !link.AttributeExtensions.ContainsKey(s_atom10Length)) 484if (!link.AttributeExtensions.ContainsKey(s_atom10Href))
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (5)
825if (!string.IsNullOrEmpty(category.Scheme) && !category.AttributeExtensions.ContainsKey(s_rss20Domain)) 1092if (selfLink != null && !item.SourceFeed.AttributeExtensions.ContainsKey(s_rss20Url)) 1175if (!link.AttributeExtensions.ContainsKey(s_rss20Url)) 1179if (link.MediaType != null && !link.AttributeExtensions.ContainsKey(s_rss20Type)) 1183if (link.Length != 0 && !link.AttributeExtensions.ContainsKey(s_rss20Length))
System.Text.Json.SourceGeneration (1)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
20if (!dictionary.ContainsKey(key))
System.Text.RegularExpressions.Generator (9)
RegexGenerator.cs (1)
184if (!requiredHelpers.ContainsKey(helper.Key))
RegexGenerator.Emitter.cs (8)
243if (!requiredHelpers.ContainsKey(DefaultTimeoutHelpers)) 309if (!requiredHelpers.ContainsKey(IsWordChar)) 349if (!requiredHelpers.ContainsKey(IsBoundary)) 374if (!requiredHelpers.ContainsKey(IsECMABoundary)) 492if (!requiredHelpers.ContainsKey(fieldName)) 567if (!requiredHelpers.ContainsKey(helperName)) 1043if (!requiredHelpers.ContainsKey(fieldName)) 1100if (!requiredHelpers.ContainsKey(fieldName))
System.Threading.Tasks.Dataflow (1)
Internal\TargetRegistry.cs (1)
111return _targetInformation.ContainsKey(target);
System.Windows.Controls.Ribbon (12)
Microsoft\Windows\Controls\KeyTipService.cs (3)
301if (!processedElements.ContainsKey(element)) 338if (!processedElements.ContainsKey(element)) 913if (cultureCache != null && cultureCache.ContainsKey(language))
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (4)
72if (_childIndexToStarLayoutIndexMap.ContainsKey(i)) 90if (_childIndexToStarLayoutIndexMap.ContainsKey(i)) 278if (_childIndexToStarLayoutIndexMap.ContainsKey(i)) 310_childIndexToStarLayoutIndexMap.ContainsKey(i))
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (3)
247Debug.Assert(ribbon.TabDisplayIndexToIndexMap.ContainsKey(i)); 684if (!contextualTabHeaders.ContainsKey(contextualTabGroupHeader)) 728if (contextualTabGroupHeader != null && contextualTabHeaders.ContainsKey(contextualTabGroupHeader))
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
1648if (TabDisplayIndexToIndexMap.ContainsKey(displayIndex)) 1662if (TabIndexToDisplayIndexMap.ContainsKey(index))
System.Windows.Forms (33)
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
232bool wasProcessed = typeGuid != Guid.Empty && s_processedLibraries.ContainsKey(typeGuid);
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (4)
20Debug.Assert(!s_acWindows.ContainsKey(acHandle)); 28if (!s_acWindows.ContainsKey(handle)) 73Debug.Assert(s_acWindows.ContainsKey(HWND)); 88if (!s_acWindows.ContainsKey(acHandle))
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObjectCollection.cs (1)
21if (!ContainsKey(key) && _owningComboBoxAccessibleObject.TryGetOwnerAs(out ComboBox? owner))
System\Windows\Forms\Controls\ListView\ListView.cs (1)
4045Debug.Assert(!_listItemsTable.ContainsKey(itemID), "internal hash table inconsistent -- inserting item, but it's already in the hash table");
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
719if (toolStrip.Shortcuts.ContainsKey(shortcut)) 802|| !toolStrip.Shortcuts.ContainsKey(shortcut))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
384if (owner.Shortcuts.ContainsKey(value)) 570if (shortcut != Keys.None && _lastOwner.Shortcuts.ContainsKey(shortcut)) 927if (Owner.Shortcuts.ContainsKey(shortcut))
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (1)
223Debug.Assert(!itemLocationHash.ContainsKey(item.Name), "WARNING: ToolStripItem name not unique.");
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (2)
54if (tv._nodesByHandle.ContainsKey(value.Handle) && value._index != index) 59if (tv._nodesByHandle.ContainsKey(value.Handle)
System\Windows\Forms\Controls\WebBrowser\HtmlShimManager.cs (3)
39else if (!_htmlDocumentShims.ContainsKey(doc)) 63else if (!_htmlWindowShims.ContainsKey(window)) 89else if (!_htmlElementShims.ContainsKey(element))
System\Windows\Forms\DataBinding\BindingContext.cs (1)
168return _listManagers.ContainsKey(GetKey(dataSource, dataMember));
System\Windows\Forms\Form.cs (2)
4478if (!_dpiFormSizes.ContainsKey(e.DeviceDpiNew)) 4484if (!_dpiFormSizes.ContainsKey(e.DeviceDpiOld))
System\Windows\Forms\Help\HelpProvider.cs (1)
233return _showHelp.ContainsKey(ctl);
System\Windows\Forms\Input\KeysConverter.cs (4)
32if (CultureToDisplayOrder.ContainsKey(cultureInfo) && CultureToKeyName.ContainsKey(cultureInfo)) 337if (!CultureToDisplayOrder.ContainsKey(culture)) 350if (!CultureToKeyName.ContainsKey(culture))
System\Windows\Forms\OLE\DataObject.DataStore.cs (2)
117&& !_mappedData.ContainsKey(DataFormats.Serializable)) 137return _mappedData.ContainsKey(format);
System\Windows\Forms\PropertyStore.cs (1)
26public bool ContainsKey(int key) => _values.ContainsKey(key);
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1041_tools.ContainsKey(currentControl)) 1218bool exists = _tools.ContainsKey(control); 1751if (_tools.ContainsKey(tool)) 1793if (tool is not null && _tools.ContainsKey(tool))
System.Windows.Forms.Design (9)
System\ComponentModel\Design\ComponentDesigner.cs (1)
430if (!props.ContainsKey(prop.Name))
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (1)
51public bool Contains(string propertyName) => _properties is not null && _properties.ContainsKey(propertyName);
System\ComponentModel\Design\DesignerActionService.cs (1)
118return _designerActionLists.ContainsKey(comp);
System\ComponentModel\Design\InheritanceService.cs (1)
188bool notPresent = !_inheritedComponents.ContainsKey(compValue);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
177if (!assemblies.ContainsKey(a))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
2724if (propertyReferenceEx.TargetObject is CodeThisReferenceExpression && (names is null || names.ContainsKey(propertyReferenceEx.PropertyName)))
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (2)
749if (_instancesByName is not null && _instancesByName.ContainsKey(name)) 929if (_instancesByName.ContainsKey(name))
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1423affectsPosition = dsv.Visibility == DesignerSerializationVisibility.Hidden && ExtenderProperties.ContainsKey(member.Name);
System.Windows.Forms.Primitives (2)
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (2)
69=> _reverseLookup.ContainsKey(name) || (_priorAdapter is { } prior && prior.NameInUse(name)); 72=> _members.ContainsKey(id) || (_priorAdapter is { } prior && prior.IdInUse(id));
System.Windows.Forms.Tests (2)
System\Windows\Forms\ClipboardTests.cs (1)
1140public bool GetDataPresent(string format) => _formatToJson.ContainsKey(format);
System\Windows\Forms\PropertyGridTests.cs (1)
2782Assert.True(_designerSelections.ContainsKey(previousActiveDesigner.GetHashCode()));
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
614if (!this.manipulatorStates.ContainsKey(initialState.Id))
System.Xaml (14)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (4)
864return (_subsumingNamespaces is null ? false : _subsumingNamespaces.ContainsKey(namespaceName)); 891return (_knownNamespaces is null ? false : _knownNamespaces.ContainsKey(namespaceName)); 1782return _ignorables is not null && _ignorables.ContainsKey(namespaceName); 1979return _all || (_names is not null && _names.ContainsKey(itemName));
System\Xaml\Context\NameFixupGraph.cs (2)
80Debug.Assert(!_dependenciesByChildObject.ContainsKey(fixupToken.ReferencedObject)); 102return _dependenciesByParentObject.ContainsKey(parent);
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
1932if (!PendingKeyConversionContexts.ContainsKey(parentCollection)) 2614if (_pendingKeyConversionContexts is not null && _pendingKeyConversionContexts.ContainsKey(instance))
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
330if (result.ContainsKey(oldns))
System\Xaml\Parser\MeScanner.cs (1)
591_context.CurrentEscapeCharacterMapForMarkupExtension.ContainsKey(propertyName))
System\Xaml\XamlType.cs (1)
1589if (ctorDict.ContainsKey(typeVector.Length))
System\Xaml\XamlXmlWriter.cs (3)
730if (prefixMap.ContainsKey(prefix)) 736if (namespaceMap.ContainsKey(ns)) 2170return dictionary.ContainsKey(member);
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
190if (!_defaultTasksByToolset.ContainsKey(toolsVersion))
UnitTests.Common (1)
TestTypes.cs (1)
157return (s_localizedErrorCodes.ContainsKey(errorCode) ? s_localizedErrorCodes[errorCode] : s_localizedErrorCodes[ErrorCode.UnknownException]);
WindowsFormsIntegration (1)
System\Windows\Integration\PropertyMap.cs (1)
201return _wrappedDictionary.ContainsKey(propertyName);
XmlFileLogger (2)
LogProcessNode.cs (2)
98if (_childNodes.ContainsKey(type)) 117return _childNodes.ContainsKey(t) ? _childNodes[t].Cast<T>() : new List<T>();
xunit.console (2)
common\DictionaryExtensions.cs (1)
44if (!result.ContainsKey(key))
common\Json.cs (1)
514if (dictionary.ContainsKey(memberName))