127 references to TryGetPropertyValue
aspire (21)
Agents\AspireSkills\AspireSkillsRemoteConfiguration.cs (5)
98
if (!root.
TryGetPropertyValue
("skills", out var skills))
184
if (marketplaces is not null && marketplaces.
TryGetPropertyValue
(marketplaceName, out var marketplaceNode))
253
if (!parent.
TryGetPropertyValue
(key, out var node))
276
if (!parent.
TryGetPropertyValue
(key, out var node))
301
if (!parent.
TryGetPropertyValue
(key, out var node))
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (2)
148
if (settings.
TryGetPropertyValue
("hooks", out var hooksNode))
163
if (hooks.
TryGetPropertyValue
("PostToolUse", out var postToolUseNode))
Agents\OpenCode\OpenCodeAgentClient.cs (3)
97
if (!config.
TryGetPropertyValue
("skills", out var skills))
154
if (servers is not null && servers.
TryGetPropertyValue
("aspire", out var server))
204
if (mcp is not null && mcp.
TryGetPropertyValue
("servers", out var servers))
src\Shared\Json\JsonFlattener.cs (1)
38
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
src\Shared\Telemetry\InternalMicrosoftDetector.cs (3)
760
if (!userConfiguration.
TryGetPropertyValue
("kerberosStatus", out var kerberosStatusNode) ||
1878
return json.
TryGetPropertyValue
(propertyName, out var node) &&
1904
return json.
TryGetPropertyValue
(propertyName, out var value) &&
Templating\TemplateSourceStore.cs (1)
90
if (settings.
TryGetPropertyValue
(key, 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.Dashboard (3)
src\Shared\Telemetry\InternalMicrosoftDetector.cs (3)
760
if (!userConfiguration.
TryGetPropertyValue
("kerberosStatus", out var kerberosStatusNode) ||
1878
return json.
TryGetPropertyValue
(propertyName, out var node) &&
1904
return json.
TryGetPropertyValue
(propertyName, out var value) &&
Aspire.Hosting (19)
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))
src\Shared\Json\JsonFlattener.cs (1)
38
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
Aspire.Hosting.Azure (3)
AzureProvisioningController.cs (3)
2617
deployment.
TryGetPropertyValue
("resourceId", out var resourceIdNode) ? resourceIdNode?.GetValue<string>() : null,
2777
!outputsObject.
TryGetPropertyValue
(outputName, out var outputNode) ||
2779
!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)
1054
var sectionData = _state.
TryGetPropertyValue
(sectionName, out var node) && node is JsonObject obj
Aspire.Hosting.CodeGeneration.Go (1)
AtsGoCodeGenerator.cs (1)
1302
if (!value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.CodeGeneration.Java (1)
AtsJavaCodeGenerator.cs (1)
905
if (!value.
TryGetPropertyValue
(property.Name, out var propertyValue))
Aspire.Hosting.CodeGeneration.Python (1)
AtsPythonCodeGenerator.cs (1)
1042
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)
188
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
235
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
251
if (!args.
TryGetPropertyValue
("value", out var valueNode))
313
if (args == null || !args.
TryGetPropertyValue
("context", out var contextNode))
336
if (args.
TryGetPropertyValue
(paramName, out var argNode))
433
if (args != null && args.
TryGetPropertyValue
(paramName, out var argNode))
1058
if (!args.
TryGetPropertyValue
(name, out var node) || node is not JsonValue value)
1072
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
1084
if (args.
TryGetPropertyValue
(name, out var node) && node is JsonValue value)
1100
if (!args.
TryGetPropertyValue
(name, out var node))
1127
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 (12)
Orchestrator\ParameterProcessorTests.cs (12)
1626
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1632
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out savedValueNode));
1659
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
1844
Assert.False(stateManager.State.
TryGetPropertyValue
(firstParameter.ConfigurationKey, out _));
2042
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("ConnectionStrings:mydb", out var valueNode));
2083
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("Parameters:myparam", out var valueNode));
2127
Assert.True(capturingStateManager.State.
TryGetPropertyValue
("MyCustomSection:MyCustomKey", out var valueNode));
2166
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
2184
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
2252
Assert.True(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out var savedValueNode));
2442
Assert.False(capturingStateManager.State.
TryGetPropertyValue
($"Parameters:{parameter.Name}", out _));
2743
var sectionData = _unflattenedState.
TryGetPropertyValue
(sectionName, out var sectionNode) && sectionNode is JsonObject obj
Infrastructure.Tests (2)
Pipelines\NixCliPackageTests.cs (2)
187
Assert.True(obj.
TryGetPropertyValue
(propertyName, out var value), $"Expected property '{propertyName}'.");
193
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 (3)
HostSpecificTemplateData.cs (1)
192
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
JExtensions.cs (1)
269
if (obj.
TryGetPropertyValue
(key, out JsonNode? result))
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (1)
223
parentProperty.AsObject().
TryGetPropertyValue
(newJsonPropertyName, out JsonNode? existingValue))
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)
sdk-tasks (1)
PublishMutationUtilities.cs (1)
43
if (targetObj.
TryGetPropertyValue
(entryPoint.Key, out JsonNode value))
System.Text.Json (1)
System\Text\Json\Nodes\JsonObject.cs (1)
242
if (
TryGetPropertyValue
(propertyName, out JsonNode? value))