Implemented interface member:
70 references to ContainsKey
aspire (20)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (4)
200return servers.ContainsKey(AspireServerName); 235return servers.ContainsKey("playwright"); 278if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 319if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject)
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (4)
183return servers.ContainsKey(AspireServerName); 240if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 295if (!config.ContainsKey("mcpServers") || config["mcpServers"] is not JsonObject) 339return servers.ContainsKey("playwright");
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (4)
140return mcp.ContainsKey(AspireServerName); 226if (!config.ContainsKey("mcp") || config["mcp"] is not JsonObject) 274if (!config.ContainsKey("mcp") || config["mcp"] is not JsonObject) 317return mcp.ContainsKey("playwright");
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (4)
226return servers.ContainsKey(AspireServerName); 261return servers.ContainsKey("playwright"); 311if (!config.ContainsKey("servers") || config["servers"] is not JsonObject) 359if (!config.ContainsKey("servers") || config["servers"] is not JsonObject)
Configuration\ConfigurationService.cs (4)
197if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 227if (settings.ContainsKey(partialKey) && settings[partialKey] is not JsonObject) 251if (!currentObject.ContainsKey(part) || currentObject[part] is not JsonObject) 262if (!currentObject.ContainsKey(finalKey))
Aspire.Cli.Tests (18)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (5)
60Assert.True(config.ContainsKey("mcpServers")); 64Assert.True(servers.ContainsKey("aspire")); 80Assert.True(env.ContainsKey("DOTNET_ROOT")); 126Assert.True(servers.ContainsKey("other-server")); 127Assert.True(servers.ContainsKey("aspire"));
Agents\VsCodeAgentEnvironmentScannerTests.cs (7)
146Assert.True(config.ContainsKey("servers")); 150Assert.True(servers.ContainsKey("aspire")); 164Assert.False(aspireServer.ContainsKey("tools")); 204Assert.True(servers.ContainsKey("other-server")); 205Assert.True(servers.ContainsKey("aspire")); 282Assert.True(servers.ContainsKey("aspire")); 283Assert.True(servers.ContainsKey("playwright"));
Commands\ConfigCommandTests.cs (1)
279Assert.False(settings.ContainsKey("deep"));
Mcp\ListStructuredLogsToolTests.cs (3)
204Assert.False(firstLogAttributes.ContainsKey(OtlpHelpers.AspireLogIdAttribute), "aspire.log_id should be filtered from attributes"); 205Assert.True(firstLogAttributes.ContainsKey("custom.attr"), "custom.attr should be present in attributes"); 220Assert.False(secondLogAttributes.ContainsKey(OtlpHelpers.AspireLogIdAttribute), "aspire.log_id should be filtered from attributes");
Projects\ProjectUpdaterTests.cs (2)
2578if (!items.ContainsKey("ProjectReference")) 2582if (!items.ContainsKey("PackageReference"))
Aspire.Hosting.Azure.Tests (4)
AzureDeployerTests.cs (1)
1324Assert.True(stateJson.AsObject().ContainsKey("Azure:SubscriptionId"));
BicepUtilitiesTests.cs (3)
326Assert.True(parameters.ContainsKey("normalParam")); 327Assert.True(parameters.ContainsKey(AzureBicepResource.KnownParameters.PrincipalId)); 328Assert.True(parameters.ContainsKey(AzureBicepResource.KnownParameters.Location));
Aspire.Hosting.RemoteHost.Tests (4)
CapabilityDispatcherTests.cs (4)
334Assert.True(handleRef.ContainsKey("$handle"), "Result should be a handle reference"); 335Assert.True(handleRef.ContainsKey("$type"), "Result should have a type"); 810Assert.True(resultObj.ContainsKey("$handle")); 934Assert.True(resultObj.ContainsKey("$handle"));
Aspire.Hosting.Tests (2)
JsonFlattenerTests.cs (2)
42Assert.False(result.ContainsKey("Azure"), "Should not have nested 'Azure' object"); 214Assert.False(result.ContainsKey("EmptyArray"));
aspire-server (2)
Ats\HandleRegistry.cs (1)
214return node is JsonObject obj && obj.ContainsKey("$handle");
Ats\ReferenceExpressionRef.cs (1)
101return node is JsonObject obj && obj.ContainsKey("$expr");
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
80if (secrets.ContainsKey(signkingKeysPropertyName))
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (3)
UserJwtsTests.cs (3)
302Assert.True(secretsJson.ContainsKey(SigningKeysHandler.GetSigningKeyPropertyName(DevJwtsDefaults.Scheme))); 587Assert.True(secretsJson.ContainsKey(SigningKeysHandler.GetSigningKeyPropertyName("test-scheme"))); 609Assert.True(secretsJson.ContainsKey(SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")));
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (2)
JsonPatchDocumentJObjectTest.cs (2)
90Assert.False(model.CustomData.ContainsKey("LastName")); 106Assert.False(model.CustomData.ContainsKey("FirstName"));
Microsoft.Extensions.AI.Abstractions (8)
Utilities\AIJsonUtilities.Schema.Create.cs (7)
296if (ctx.TypeInfo.Type.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(TypePropertyName)) 302if (ctx.TypeInfo.Kind is JsonTypeInfoKind.Enumerable && !objSchema.ContainsKey(ItemsPropertyName)) 345if (nullableElement.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(TypePropertyName)) 556requiredSchemaObj.ContainsKey(PropertiesPropertyName)) 623if (!obj.ContainsKey(EnumPropertyName))
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
128if (transformOptions.DisallowAdditionalProperties && properties is not null && !schemaObj.ContainsKey(AdditionalPropertiesPropertyName))
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests.cs (2)
98Assert.True(jsonObj.ContainsKey("informationalOnly") || jsonObj.ContainsKey("InformationalOnly"));
Microsoft.ML.AutoML.SourceGenerator (4)
SearchSpaceGenerator.cs (4)
65var defaultToken = t.AsObject().ContainsKey("default") ? t["default"] : null; 86var searchSpaceNode = t.AsObject().ContainsKey("search_space") ? t["search_space"] : null; 93else if (searchSpaceNode is JsonObject searchSpaceObject && searchSpaceObject.ContainsKey("min")) 99var logBase = searchSpaceObject.ContainsKey("log_base") is false ? "false" : searchSpaceNode["log_base"].GetValue<bool>() ? "true" : "false";