4 overrides of TryGetValue
System.Text.Json (4)
System\Text\Json\Nodes\JsonValueOfJsonPrimitive.cs (3)
66public override bool TryGetValue<T>([NotNullWhen(true)] out T? value) 150public override bool TryGetValue<T>([NotNullWhen(true)] out T? value) 197public override bool TryGetValue<T>([NotNullWhen(true)] out T? value)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
38public override bool TryGetValue<T>([NotNullWhen(true)] out T value)
66 references to TryGetValue
aspire (13)
Agents\AspireSkills\GitHubArtifactAttestationVerifier.cs (1)
175if (bundleNode is JsonValue bundleValue && bundleValue.TryGetValue<string>(out var bundleString))
Agents\Hooks\TelemetryHookConfigurator.cs (2)
352&& commandValue.TryGetValue<string>(out var command) 363&& argValue.TryGetValue<string>(out var argString)
Backchannel\ResourceSnapshotMapper.cs (1)
216if (node is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var stringValue))
Mcp\Tools\McpToolHelpers.cs (2)
129if (jsonValue.TryGetValue<bool>(out var boolValue)) 134if (jsonValue.TryGetValue<string>(out var stringValue) && bool.TryParse(stringValue, out var parsedBool))
Projects\TypeScriptAppHostToolchainResolver.cs (1)
312!packageManagerValue.TryGetValue<string>(out var packageManager) ||
Scaffolding\PackageJsonMerger.cs (4)
155if (value is not JsonValue scriptValue || !scriptValue.TryGetValue<string>(out var command)) 229if (versionNode is not JsonValue desiredValue || !desiredValue.TryGetValue<string>(out var desiredVersion)) 250&& existingValue.TryGetValue<string>(out var existingVersion) 273&& existingValue.TryGetValue<string>(out var existingVersion)
Scaffolding\ScaffoldingService.cs (1)
400existingScriptValue.TryGetValue<string>(out var existingScript) &&
Telemetry\InternalMicrosoftDetector.cs (1)
1310jsonValue.TryGetValue<string>(out var text)
Aspire.Hosting (5)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (3)
1434JsonValue jsonValue when jsonValue.TryGetValue<string>(out var stringValue) => stringValue, 1435JsonValue jsonValue when jsonValue.TryGetValue<bool>(out var boolValue) => boolValue.ToString(CultureInfo.InvariantCulture), 1436JsonValue jsonValue when jsonValue.TryGetValue<IFormattable>(out var formattableValue) => formattableValue.ToString(null, CultureInfo.InvariantCulture),
Dcp\JsonPatch.cs (2)
34!operationValue.TryGetValue<string>(out var operationName) || 35!pathValue.TryGetValue<string>(out var path))
Aspire.Hosting.CodeGeneration.Python (1)
AtsPythonCodeGenerator.cs (1)
990JsonValue jsonValue when jsonValue.TryGetValue<bool>(out var boolValue) => boolValue ? "True" : "False",
Aspire.Hosting.CodeGeneration.TypeScript (1)
TypeScriptLanguageSupport.cs (1)
220return node is JsonValue value && value.TryGetValue<string>(out var stringValue) ? stringValue : null;
Aspire.Hosting.RemoteHost (35)
Ats\AtsMarshaller.cs (27)
586if (node is JsonValue callbackValue && callbackValue.TryGetValue<string>(out var callbackId)) 602if (node is JsonValue tokenValue && tokenValue.TryGetValue<string>(out var tokenId) && !string.IsNullOrEmpty(tokenId)) 741JsonValue v when v.TryGetValue<string>(out _) => "string", 742JsonValue v when v.TryGetValue<bool>(out _) => "bool", 743JsonValue v when v.TryGetValue<long>(out _) => "number", 744JsonValue v when v.TryGetValue<double>(out _) => "number", 772if (value.TryGetValue<int>(out var intValue)) 778if (value.TryGetValue<decimal>(out var decimalValue)) 783if (value.TryGetValue<long>(out var longValue)) 788if (value.TryGetValue<ulong>(out var ulongValue)) 793if (value.TryGetValue<double>(out var doubleValue) && double.IsFinite(doubleValue)) 810if (value.TryGetValue<int>(out var intValue)) 815if (value.TryGetValue<long>(out var longValue)) 820if (value.TryGetValue<ulong>(out var ulongValue)) 825if (value.TryGetValue<decimal>(out var decimalValue)) 830if (value.TryGetValue<double>(out var doubleValue) && double.IsFinite(doubleValue)) 863if (value.TryGetValue<string>(out var s)) 867if (value.TryGetValue<bool>(out var b)) 871if (value.TryGetValue<long>(out var l)) 875if (value.TryGetValue<double>(out var d)) 885if (value.TryGetValue<string>(out var enumName)) 890if (value.TryGetValue<int>(out var enumValue)) 953return value.TryGetValue<float>(out var floatValue) ? floatValue : (float)value.GetValue<double>(); 964if (value.TryGetValue<double>(out var ms)) 968if (value.TryGetValue<string>(out var str)) 978if (value.TryGetValue<string>(out var str)) 987if (value.TryGetValue<string>(out var str))
Ats\CapabilityDispatcher.cs (5)
943value.TryGetValue<string>(out _); 951JsonValue v when v.TryGetValue<string>(out _) => "string", 952JsonValue v when v.TryGetValue<bool>(out _) => "bool", 953JsonValue v when v.TryGetValue<long>(out _) => "number", 954JsonValue v when v.TryGetValue<double>(out _) => "number",
Ats\ReferenceExpressionRef.cs (3)
90matchValueJsonValue.TryGetValue<string>(out var mv)) 107!formatValue.TryGetValue<string>(out var format)) 230else if (providerNode is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var stringValue))
Microsoft.AspNetCore.OpenApi (3)
Extensions\JsonNodeSchemaExtensions.cs (2)
617return jsonNode is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var identifier) 626if (node is JsonValue jsonValue && jsonValue.TryGetValue<string>(out var identifier))
Services\Schemas\OpenApiSchemaService.cs (1)
593refValue.TryGetValue<string>(out var refString) &&
Microsoft.TemplateEngine.Cli (1)
JExtensions.cs (1)
253if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateEngine.Edge (1)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateEngine.Utils (1)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
Microsoft.TemplateSearch.Common (1)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (1)
130if (token is JsonValue jv && jv.TryGetValue(out int intVal))
System.Text.Json (3)
System\Text\Json\Nodes\JsonNode.cs (1)
191/// <seealso cref="System.Text.Json.Nodes.JsonValue.TryGetValue"></seealso>
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
32if (otherNode is JsonValue otherValue && otherValue.TryGetValue(out TValue? v))
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
512jsonValue.TryGetValue(out string? value) &&