84 references to TryGetPropertyValue
aspire (24)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (2)
198
if (config.
TryGetPropertyValue
("mcpServers", out var serversNode) && serversNode is JsonObject servers)
233
if (config.
TryGetPropertyValue
("mcpServers", out var serversNode) && serversNode is JsonObject servers)
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (2)
181
if (config.
TryGetPropertyValue
("mcpServers", out var serversNode) && serversNode is JsonObject servers)
337
if (config.
TryGetPropertyValue
("mcpServers", out var serversNode) && serversNode is JsonObject servers)
Agents\DeprecatedMcpCommandScanner.cs (10)
120
if (!config.
TryGetPropertyValue
(serversKey, out var serversNode) || serversNode is not JsonObject servers)
125
if (!servers.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
130
if (!aspire.
TryGetPropertyValue
("args", out var argsNode) || argsNode is not JsonArray args)
152
if (!config.
TryGetPropertyValue
(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp)
157
if (!mcp.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
162
if (!aspire.
TryGetPropertyValue
("command", out var commandNode) || commandNode is not JsonArray command)
222
if (config.
TryGetPropertyValue
(serversKey, out var serversNode) &&
224
servers.
TryGetPropertyValue
("aspire", out var aspireNode) &&
236
if (config.
TryGetPropertyValue
(serversKey, out var mcpNode) &&
238
mcp.
TryGetPropertyValue
("aspire", out var aspireNode) &&
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (2)
138
if (config.
TryGetPropertyValue
("mcp", out var mcpNode) && mcpNode is JsonObject mcp)
315
if (config.
TryGetPropertyValue
("mcp", out var mcpNode) && mcpNode is JsonObject mcp)
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (2)
224
if (config.
TryGetPropertyValue
("servers", out var serversNode) && serversNode is JsonObject servers)
259
if (config.
TryGetPropertyValue
("servers", out var serversNode) && serversNode is JsonObject servers)
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (6)
105
if (!config.
TryGetPropertyValue
(serversKey, out var serversNode) || serversNode is not JsonObject servers)
110
if (!servers.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
115
if (!aspire.
TryGetPropertyValue
("args", out var argsNode) || argsNode is not JsonArray args)
137
if (!config.
TryGetPropertyValue
(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp)
142
if (!mcp.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
147
if (!aspire.
TryGetPropertyValue
("command", out var commandNode) || commandNode is not JsonArray command)
Aspire.Hosting (5)
Devcontainers\DevcontainerSettingsWriter.cs (2)
123
if (!settings.
TryGetPropertyValue
(PortAttributesFieldName, out var portsAttributesNode))
167
if (!portsAttributes.
TryGetPropertyValue
(port, out var portAttributeNode))
Pipelines\Internal\DeploymentStateManagerBase.cs (2)
192
if (current is not JsonObject currentObj || !currentObj.
TryGetPropertyValue
(segment, out var nextNode))
288
if (!current.
TryGetPropertyValue
(segment, out var nextNode) || nextNode is not JsonObject nextObj)
Pipelines\Internal\JsonFlattener.cs (1)
44
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
Aspire.Hosting.Azure.Tests (2)
AzureManifestUtils.cs (1)
33
if (!manifestNode.AsObject().
TryGetPropertyValue
("path", out var pathNode))
ProvisioningTestHelpers.cs (1)
616
var sectionData = _state.
TryGetPropertyValue
(sectionName, out var node) && node is JsonObject obj
Aspire.Hosting.Tests (4)
Orchestrator\ParameterProcessorTests.cs (4)
1284
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("ConnectionStrings:mydb", out var valueNode));
1325
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("Parameters:myparam", out var valueNode));
1369
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("MyCustomSection:MyCustomKey", out var valueNode));
1601
var sectionData = _unflattenedState.
TryGetPropertyValue
(sectionName, out var sectionNode) && sectionNode is JsonObject obj
aspire-server (15)
Ats\CapabilityDispatcher.cs (11)
156
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
188
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
204
if (!args.
TryGetPropertyValue
("value", out var valueNode))
245
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
268
if (args.
TryGetPropertyValue
(paramName, out var argNode))
360
if (args != null && args.
TryGetPropertyValue
(paramName, out var argNode))
547
if (!args.
TryGetPropertyValue
(name, out var node) || node is not JsonValue value)
561
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
573
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
589
if (!args.
TryGetPropertyValue
(name, out var node))
616
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonObject obj)
Ats\HandleRegistry.cs (1)
198
if (node is JsonObject obj && obj.
TryGetPropertyValue
("$handle", out var handleNode))
Ats\ReferenceExpressionRef.cs (3)
57
if (node is not JsonObject obj || !obj.
TryGetPropertyValue
("$expr", out var exprNode))
68
if (!exprObj.
TryGetPropertyValue
("format", out var formatNode) ||
77
if (exprObj.
TryGetPropertyValue
("valueProviders", out var providersNode) &&
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (3)
UserJwtsTests.cs (3)
303
Assert.True(secretsJson.
TryGetPropertyValue
("Foo", out var fooField));
524
Assert.True(secretsJson.
TryGetPropertyValue
("Foo", out var fooField));
552
Assert.True(secretsJson.
TryGetPropertyValue
("Foo", out var fooField));
Microsoft.AspNetCore.JsonPatch.SystemTextJson (3)
Internal\JsonObjectAdapter.cs (3)
37
if (!obj.
TryGetPropertyValue
(segment, out var valueAsToken))
98
if (!obj.
TryGetPropertyValue
(segment, out var currentValue))
129
if (!obj.
TryGetPropertyValue
(segment, out var nextTargetToken))
Microsoft.AspNetCore.OpenApi (2)
Services\Schemas\OpenApiSchemaService.cs (2)
465
if (jsonObject.
TryGetPropertyValue
(OpenApiConstants.RefKeyword, out var refNode) &&
554
if (currentObject.
TryGetPropertyValue
(segment, out var nextNode) && nextNode != null)
Microsoft.AspNetCore.OpenApi.Tests (8)
Extensions\JsonNodeSchemaExtensionsTests.cs (8)
122
Assert.False(schema.
TryGetPropertyValue
("minimum", out _));
123
Assert.False(schema.
TryGetPropertyValue
("maximum", out _));
129
Assert.False(schema.
TryGetPropertyValue
("exclusiveMinimum", out _));
130
Assert.False(schema.
TryGetPropertyValue
("exclusiveMaximum", out _));
145
Assert.False(schema.
TryGetPropertyValue
("minimum", out _));
146
Assert.False(schema.
TryGetPropertyValue
("maximum", out _));
147
Assert.False(schema.
TryGetPropertyValue
("exclusiveMinimum", out _));
148
Assert.False(schema.
TryGetPropertyValue
("exclusiveMaximum", out _));
Microsoft.Extensions.AI.Abstractions (13)
Utilities\AIJsonUtilities.Schema.Create.cs (5)
283
if (parameter?.Name is not null && objSchema.
TryGetPropertyValue
(RefPropertyName, out JsonNode? paramName))
334
if (objSchema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeKeyWord) &&
355
if (objSchema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeKeyWord) &&
558
JsonArray? requiredArray = requiredSchemaObj.
TryGetPropertyValue
(RequiredPropertyName, out JsonNode? existing) ?
707
if (!schema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeNode))
Utilities\AIJsonUtilities.Schema.Transform.cs (8)
68
if (schemaObj.
TryGetPropertyValue
(PropertiesPropertyName, out JsonNode? props) && props is JsonObject propsObj)
82
if (schemaObj.
TryGetPropertyValue
(ItemsPropertyName, out JsonNode? itemsSchema))
89
if (schemaObj.
TryGetPropertyValue
(AdditionalPropertiesPropertyName, out JsonNode? additionalProps) &&
97
if (schemaObj.
TryGetPropertyValue
(NotPropertyName, out JsonNode? notSchema))
108
if (schemaObj.
TryGetPropertyValue
(combinatorKeyword, out JsonNode? combinatorSchema) && combinatorSchema is JsonArray combinatorArray)
145
schemaObj.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeSchema) &&
178
schemaObj.
TryGetPropertyValue
(DefaultPropertyName, out JsonNode? defaultSchema))
180
string? description = schemaObj.
TryGetPropertyValue
(DescriptionPropertyName, out JsonNode? descriptionSchema) ? descriptionSchema?.GetValue<string>() : null;
Microsoft.Extensions.AI.Abstractions.Tests (4)
Contents\FunctionCallContentTests.cs (2)
101
if (jsonObj.
TryGetPropertyValue
("informationalOnly", out var value1))
105
else if (jsonObj.
TryGetPropertyValue
("InformationalOnly", out var value2))
Utilities\AIJsonUtilitiesTests.cs (2)
1602
if (schemaObj.
TryGetPropertyValue
("properties", out JsonNode? props))
1609
if (schemaObj.
TryGetPropertyValue
("type", out JsonNode? type) && type is JsonArray typeArray)
System.Text.Json (1)
System\Text\Json\Nodes\JsonObject.cs (1)
254
if (
TryGetPropertyValue
(propertyName, out JsonNode? value))