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