44 references to TryGetProperty
dotnet-user-jwts (7)
Helpers\DevJwtCliHelpers.cs (7)
89
if (launchSettingsJson.RootElement.
TryGetProperty
("profiles", out var profiles))
107
if (rootElement.
TryGetProperty
("iisSettings", out var iisSettings))
109
if (iisSettings.
TryGetProperty
("iisExpress", out var iisExpress))
112
if (iisExpress.
TryGetProperty
("applicationUrl", out var iisUrl))
117
if (iisExpress.
TryGetProperty
("sslPort", out var sslPort))
131
if (profile.Value.
TryGetProperty
("commandName", out var commandName))
135
if (profile.Value.
TryGetProperty
("applicationUrl", out var applicationUrl))
Microsoft.AspNetCore.Authentication (1)
JsonDocumentAuthExtensions.cs (1)
21
if (element.
TryGetProperty
(key, out var property) && property.ValueKind != JsonValueKind.Null)
Microsoft.AspNetCore.Authentication.OAuth (5)
JsonKeyClaimAction.cs (1)
35
if (!userData.
TryGetProperty
(JsonKey, out var value))
JsonSubKeyClaimAction.cs (2)
57
return userData.
TryGetProperty
(propertyName, out value)
59
&& value.
TryGetProperty
(subProperty, out value);
OAuthTokenResponse.cs (2)
106
if (root.
TryGetProperty
("error_description", out var errorDescription))
112
if (root.
TryGetProperty
("error_uri", out var errorUri))
Microsoft.AspNetCore.Components.WebAssembly.Server (9)
TargetPickerUi.cs (9)
149
var hasTabs = res.
TryGetProperty
("tabs", out var tabs);
150
var hasType = res.
TryGetProperty
("type", out var type);
166
var hasUrl = tab.
TryGetProperty
("url", out var urlInTab);
167
var hasActor = tab.
TryGetProperty
("actor", out var actorInTab);
168
var hasBrowserId = tab.
TryGetProperty
("browserId", out var browserIdInTab);
209
var hasInput = res.
TryGetProperty
("input", out var input);
221
var hasTarget = res.
TryGetProperty
("target", out var target);
223
var hasConsoleActor = hasTarget && target.
TryGetProperty
("consoleActor", out consoleActor);
224
var hasActor = res.
TryGetProperty
("actor", out var actor);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\AnyConverter.cs (2)
24
if (!d.RootElement.
TryGetProperty
(AnyTypeUrlField, out var urlField))
45
if (!d.RootElement.
TryGetProperty
(AnyWellKnownTypeValueField, out var valueField))
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
119
Assert.True(loginContent.
TryGetProperty
("refreshToken", out _));
151
Assert.True(loginContent.
TryGetProperty
("refresh_token", out _));
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Protocol\Converters\ParameterInformationConverter.cs (2)
23
if (root.
TryGetProperty
("label", out var labelElement))
35
if (root.
TryGetProperty
("documentation", out var documentationElement))
Protocol\Converters\SumConverter.cs (1)
206
if (document.RootElement.
TryGetProperty
(kindAttribute.KindPropertyName, out var value))
Protocol\Internal\Converters\ClassifiedTextRunConverter.cs (1)
20
if (data.
TryGetProperty
(ObjectContentConverter.TypeProperty, out var typeProperty) && typeProperty.GetString() != nameof(ClassifiedTextRun))
Protocol\Internal\Converters\ImageIdConverter.cs (1)
21
if (root.
TryGetProperty
(ObjectContentConverter.TypeProperty, out var typeProperty) && typeProperty.GetString() != nameof(ImageId))
RoslynLanguageServer.cs (3)
195
if (parameters.
TryGetProperty
("textDocument", out var textDocumentToken) ||
196
parameters.
TryGetProperty
("_vs_textDocument", out textDocumentToken))
202
else if (parameters.
TryGetProperty
("data", out var dataToken))
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (2)
61
if (jsonDocument.RootElement.
TryGetProperty
("tools", out JsonElement toolsElement))
63
if (toolsElement.
TryGetProperty
("runtimes", out JsonElement dotnetLocalElement))
Microsoft.Extensions.AI (1)
ChatCompletion\ChatCompletion{T}.cs (1)
145
if (JsonDocument.Parse(json!).RootElement.
TryGetProperty
("data", out var data))
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatCompletion.cs (1)
221
if (jsonElement.
TryGetProperty
("function", out JsonElement functionElement))
Microsoft.JSInterop.Tests (2)
Infrastructure\DotNetDispatcherTest.cs (2)
141
Assert.False(resultDto2Ref.
TryGetProperty
(nameof(TestDTO.StringVal), out _));
142
Assert.False(resultDto2Ref.
TryGetProperty
(nameof(TestDTO.IntVal), out _));
OpenIdConnectSample (1)
Startup.cs (1)
269
if (payload.RootElement.
TryGetProperty
("expires_in", out var property) && int.TryParse(property.GetString(), out var seconds))
SocialSample (2)
Startup.cs (2)
343
if (payload.RootElement.
TryGetProperty
("expires_in", out var property) && property.TryGetInt32(out var seconds))
373
if (payload.RootElement.
TryGetProperty
("expires_in", out var property) && property.TryGetInt32(out var seconds))
System.Text.Json (1)
System\Text\Json\Document\JsonElement.cs (1)
140
if (
TryGetProperty
(propertyName, out JsonElement property))