126 references to TryGetPropertyValue
aspire (29)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (1)
172
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\Hooks\TelemetryHookConfigurator.cs (5)
219
if (settings.
TryGetPropertyValue
("hooks", out var hooksNode))
235
if (hooks.
TryGetPropertyValue
(ClaudePostToolUseKey, out var postToolUseNode))
299
|| !group.
TryGetPropertyValue
("hooks", out var innerNode)
328
if (hook.
TryGetPropertyValue
("command", out var commandNode)
336
if (hook.
TryGetPropertyValue
("args", out var argsNode) && argsNode is JsonArray args)
Agents\McpConfigFileHelper.cs (1)
45
if (config.
TryGetPropertyValue
(serverContainerKey, out var serversNode) && serversNode is JsonObject servers)
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (1)
121
if (config.
TryGetPropertyValue
("mcp", out var mcpNode) && mcpNode is JsonObject mcp)
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
211
if (config.
TryGetPropertyValue
("servers", out var serversNode) && serversNode is JsonObject servers)
src\Shared\Json\JsonFlattener.cs (1)
38
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
Telemetry\InternalMicrosoftDetector.cs (3)
749
if (!userConfiguration.
TryGetPropertyValue
("kerberosStatus", out var kerberosStatusNode) ||
1860
return json.
TryGetPropertyValue
(propertyName, out var node) &&
1886
return json.
TryGetPropertyValue
(propertyName, out var value) &&
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (6)
107
if (!config.
TryGetPropertyValue
(serversKey, out var serversNode) || serversNode is not JsonObject servers)
112
if (!servers.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
117
if (!aspire.
TryGetPropertyValue
("args", out var argsNode) || argsNode is not JsonArray args)
139
if (!config.
TryGetPropertyValue
(serversKey, out var mcpNode) || mcpNode is not JsonObject mcp)
144
if (!mcp.
TryGetPropertyValue
("aspire", out var aspireNode) || aspireNode is not JsonObject aspire)
149
if (!aspire.
TryGetPropertyValue
("command", out var commandNode) || commandNode is not JsonArray command)
Aspire.Cli.Tests (1)
Commands\ResourceCommandTests.cs (1)
2328
Assert.True(actualObject.
TryGetPropertyValue
(name, out var actualValue), $"Expected argument '{name}' to exist.");
Aspire.Hosting (18)
Dcp\JsonPatch.cs (3)
41
var hasValue = operation.
TryGetPropertyValue
("value", out var value);
68
if (currentObject.
TryGetPropertyValue
(property.Key, out var currentValue))
227
JsonObject jsonObject when jsonObject.
TryGetPropertyValue
(segment, out var child) && child is not null => child,
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)
234
if (current is not JsonObject currentObj || !currentObj.
TryGetPropertyValue
(segment, out var nextNode))
332
if (!current.
TryGetPropertyValue
(segment, out var nextNode) || nextNode is not JsonObject nextObj)
Pipelines\Internal\FileDeploymentStateManager.cs (7)
522
var baselinePropertyExists = baselineObject.
TryGetPropertyValue
(propertyName, out var baselineProperty);
523
var savedPropertyExists = valueObject.
TryGetPropertyValue
(propertyName, out var valueProperty);
557
var originalPropertyExists = originalObject.
TryGetPropertyValue
(propertyName, out var originalProperty);
558
var savedPropertyExists = savedObject.
TryGetPropertyValue
(propertyName, out var savedProperty);
559
var latestPropertyExists = result.
TryGetPropertyValue
(propertyName, out var latestProperty);
645
if (!current.
TryGetPropertyValue
(segments[i], out var nextNode) ||
664
if (!current.
TryGetPropertyValue
(segment, out var nextNode) || nextNode is not JsonObject nextObject)
Pipelines\Internal\JsonFlattener.cs (1)
44
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
Publishing\ContainerImageArchiveRewriter.cs (3)
236
if (!manifest.
TryGetPropertyValue
("RepoTags", out var repoTagsNode) || repoTagsNode is null)
354
if (!descriptor.
TryGetPropertyValue
("annotations", out var annotationsNode) || annotationsNode is null)
562
if (!annotations.
TryGetPropertyValue
(annotationName, out var value))
Aspire.Hosting.Azure (3)
AzureProvisioningController.cs (3)
2496
deployment.
TryGetPropertyValue
("resourceId", out var resourceIdNode) ? resourceIdNode?.GetValue<string>() : null,
2656
!outputsObject.
TryGetPropertyValue
(outputName, out var outputNode) ||
2658
!outputObject.
TryGetPropertyValue
("value", out var valueNode))
Aspire.Hosting.Azure.Tests (2)
AzureManifestUtils.cs (1)
34
if (!manifestNode.AsObject().
TryGetPropertyValue
("path", out var pathNode))
ProvisioningTestHelpers.cs (1)
1040
var sectionData = _state.
TryGetPropertyValue
(sectionName, out var node) && node is JsonObject obj
Aspire.Hosting.CodeGeneration.Go (1)
AtsGoCodeGenerator.cs (1)
728
if (!value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.CodeGeneration.Java (1)
AtsJavaCodeGenerator.cs (1)
904
if (!value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.CodeGeneration.Python (1)
AtsPythonCodeGenerator.cs (1)
1025
if (!value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.CodeGeneration.TypeScript (1)
TypeScriptApiProjector.cs (1)
789
if (value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.RemoteHost (21)
Ats\AtsMarshaller.cs (1)
1026
if (!source.
TryGetPropertyValue
(prop.Name, out var jsonValue))
Ats\CapabilityDispatcher.cs (11)
187
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
234
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
250
if (!args.
TryGetPropertyValue
("value", out var valueNode))
312
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
335
if (args.
TryGetPropertyValue
(paramName, out var argNode))
432
if (args != null && args.
TryGetPropertyValue
(paramName, out var argNode))
1057
if (!args.
TryGetPropertyValue
(name, out var node) || node is not JsonValue value)
1071
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
1083
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
1099
if (!args.
TryGetPropertyValue
(name, out var node))
1126
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonObject obj)
Ats\HandleRegistry.cs (1)
197
if (node is JsonObject obj && obj.
TryGetPropertyValue
("$handle", out var handleNode))
Ats\PolyglotCapabilityInvocationException.cs (1)
259
if (!args.
TryGetPropertyValue
(targetParameterName, out var targetNode))
Ats\ReferenceExpressionRef.cs (7)
71
if (node is not JsonObject obj || !obj.
TryGetPropertyValue
("$expr", out var exprNode))
82
if (exprObj.
TryGetPropertyValue
("condition", out var conditionNode))
84
exprObj.
TryGetPropertyValue
("whenTrue", out var whenTrueNode);
85
exprObj.
TryGetPropertyValue
("whenFalse", out var whenFalseNode);
88
if (exprObj.
TryGetPropertyValue
("matchValue", out var matchValueNode) &&
105
if (!exprObj.
TryGetPropertyValue
("format", out var formatNode) ||
114
if (exprObj.
TryGetPropertyValue
("valueProviders", out var providersNode) &&
Aspire.Hosting.Tests (9)
Orchestrator\ParameterProcessorTests.cs (9)
1150
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1156
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out savedValueNode));
1183
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1424
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("ConnectionStrings:mydb", out var valueNode));
1465
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("Parameters:myparam", out var valueNode));
1509
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("MyCustomSection:MyCustomKey", out var valueNode));
1548
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1566
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1662
var sectionData = _unflattenedState.
TryGetPropertyValue
(sectionName, out var sectionNode) && sectionNode is JsonObject obj
Infrastructure.Tests (2)
Pipelines\NixCliPackageTests.cs (2)
258
Assert.True(obj.
TryGetPropertyValue
(propertyName, out var value), $"Expected property '{propertyName}'.");
264
Assert.True(obj.
TryGetPropertyValue
(propertyName, out var value), $"Expected property '{propertyName}'.");
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)
591
if (jsonObject.
TryGetPropertyValue
(OpenApiConstants.RefKeyword, out var refNode) &&
741
if (!currentObject.
TryGetPropertyValue
(unescapedReferenceToken, out var referencedValue) ||
Microsoft.Extensions.AI.Abstractions (13)
Utilities\AIJsonUtilities.Schema.Create.cs (5)
290
if (parameter?.Name is not null && objSchema.
TryGetPropertyValue
(RefPropertyName, out JsonNode? paramName))
343
if (objSchema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeKeyWord) &&
364
if (objSchema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeKeyWord) &&
567
JsonArray? requiredArray = requiredSchemaObj.
TryGetPropertyValue
(RequiredPropertyName, out JsonNode? existing) ?
716
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)
1846
if (schemaObj.
TryGetPropertyValue
("properties", out JsonNode? props))
1853
if (schemaObj.
TryGetPropertyValue
("type", out JsonNode? type) && type is JsonArray typeArray)
Microsoft.TemplateEngine.Cli (2)
HostSpecificTemplateData.cs (1)
192
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
JExtensions.cs (1)
269
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
Microsoft.TemplateEngine.Edge (3)
parent\Shared\JExtensions.cs (3)
524
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
630
&& target.
TryGetPropertyValue
(property.Key, out JsonNode? targetNode)
637
&& target.
TryGetPropertyValue
(property.Key, out targetNode)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (3)
parent\Shared\JExtensions.cs (3)
524
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
630
&& target.
TryGetPropertyValue
(property.Key, out JsonNode? targetNode)
637
&& target.
TryGetPropertyValue
(property.Key, out targetNode)
Microsoft.TemplateEngine.Utils (3)
parent\Shared\JExtensions.cs (3)
524
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
630
&& target.
TryGetPropertyValue
(property.Key, out JsonNode? targetNode)
637
&& target.
TryGetPropertyValue
(property.Key, out targetNode)
Microsoft.TemplateSearch.Common (3)
parent\Shared\JExtensions.cs (3)
524
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
630
&& target.
TryGetPropertyValue
(property.Key, out JsonNode? targetNode)
637
&& target.
TryGetPropertyValue
(property.Key, out targetNode)
System.Text.Json (1)
System\Text\Json\Nodes\JsonObject.cs (1)
242
if (
TryGetPropertyValue
(propertyName, out JsonNode? value))