35 references to TryGetPropertyValue
Aspire.Hosting (4)
Devcontainers\DevcontainerSettingsWriter.cs (2)
123
if (!settings.
TryGetPropertyValue
(PortAttributesFieldName, out var portsAttributesNode))
167
if (!portsAttributes.
TryGetPropertyValue
(port, out var portAttributeNode))
Publishing\Internal\DeploymentStateManagerBase.cs (2)
95
if (!current.
TryGetPropertyValue
(key, out var existing) || existing is not JsonObject)
226
var sectionData = _state?.
TryGetPropertyValue
(sectionName, out var sectionNode) == true && sectionNode is JsonObject obj
Aspire.Hosting.Azure.Tests (2)
AzureManifestUtils.cs (1)
33
if (!manifestNode.AsObject().
TryGetPropertyValue
("path", out var pathNode))
ProvisioningTestHelpers.cs (1)
604
var sectionData = _state.
TryGetPropertyValue
(sectionName, out var node) && node is JsonObject obj
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)
484
if (jsonObject.
TryGetPropertyValue
(OpenApiConstants.RefKeyword, out var refNode) &&
573
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 (10)
Utilities\AIJsonUtilities.Schema.Create.cs (2)
273
if (parameter?.Name is not null && objSchema.
TryGetPropertyValue
(RefPropertyName, out JsonNode? paramName))
324
if (objSchema.
TryGetPropertyValue
(TypePropertyName, out JsonNode? typeKeyWord) &&
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 (2)
Utilities\AIJsonUtilitiesTests.cs (2)
1377
if (schemaObj.
TryGetPropertyValue
("properties", out JsonNode? props))
1384
if (schemaObj.
TryGetPropertyValue
("type", out JsonNode? type) && type is JsonArray typeArray)
System.Text.Json (1)
System\Text\Json\Nodes\JsonObject.cs (1)
233
if (
TryGetPropertyValue
(propertyName, out JsonNode? value))