4 overrides of GetValue
System.Text.Json (4)
System\Text\Json\Nodes\JsonValueOfJsonPrimitive.cs (3)
56public override T GetValue<T>() 140public override T GetValue<T>() 187public override T GetValue<T>()
System\Text\Json\Nodes\JsonValueOfT.cs (1)
23public override T GetValue<T>()
979 references to GetValue
aspire (20)
Agents\DeprecatedMcpCommandScanner.cs (5)
137args[0]?.GetValue<string>() == "mcp" && 138args[1]?.GetValue<string>() == "start") 169command[0]?.GetValue<string>() == "aspire" && 170command[1]?.GetValue<string>() == "mcp" && 171command[2]?.GetValue<string>() == "start")
Commands\InitCommand.cs (6)
731if (!TryParseHostPort(https["applicationUrl"]?.GetValue<string>(), "https", out var dashboardHttps) 732|| !TryParseHostPort(http["applicationUrl"]?.GetValue<string>(), "http", out var dashboardHttp) 733|| !TryParseHostPort(httpsEnv[KnownConfigNames.DashboardOtlpGrpcEndpointUrl]?.GetValue<string>(), "https", out var otlpHttps) 734|| !TryParseHostPort(httpEnv[KnownConfigNames.DashboardOtlpGrpcEndpointUrl]?.GetValue<string>(), "http", out var otlpHttp) 735|| !TryParseHostPort(httpsEnv[KnownConfigNames.ResourceServiceEndpointUrl]?.GetValue<string>(), "https", out var resourceServiceHttps) 736|| !TryParseHostPort(httpEnv[KnownConfigNames.ResourceServiceEndpointUrl]?.GetValue<string>(), "http", out var resourceServiceHttp))
Migrations\TypeScriptAppHostMigration.cs (3)
208var currentPath = pathValue.GetValue<string>(); 260rewritten.Add((JsonNode?)JsonValue.Create(LegacyTypeScriptAppHost.RewriteTsConfigIncludeEntry(value.GetValue<string>()))); 299var current = value.GetValue<string>();
Npm\SigstoreNpmProvenanceChecker.cs (1)
219predicateType = predicateTypeValue.GetValue<string>();
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (5)
124args[0]?.GetValue<string>() == "mcp" && 125args[1]?.GetValue<string>() == "start") 156command[0]?.GetValue<string>() == "aspire" && 157command[1]?.GetValue<string>() == "mcp" && 158command[2]?.GetValue<string>() == "start")
Aspire.Cli.EndToEnd.Tests (23)
CSharpInitTests.cs (2)
68var path = appHostNode!["path"]?.GetValue<string>(); 71var language = appHostNode["language"]?.GetValue<string>();
SelfUpdateChannelPersistenceTests.cs (1)
89Assert.Equal("staging", updatedConfig["channel"]?.GetValue<string>());
SingleFileAppHostInitDotnetRunTests.cs (4)
87Assert.Equal("Project", httpsProfile["commandName"]?.GetValue<string>()); 88Assert.False(string.IsNullOrWhiteSpace(httpsProfile["applicationUrl"]?.GetValue<string>())); 91Assert.False(string.IsNullOrWhiteSpace(httpsEnv["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]?.GetValue<string>())); 92Assert.False(string.IsNullOrWhiteSpace(httpsEnv["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]?.GetValue<string>()));
TypeScriptMigrateAppHostTests.cs (1)
216var includes = tsconfig["include"]!.AsArray().Select(n => n!.GetValue<string>()).ToArray();
TypeScriptPolyglotTests.cs (15)
355originalDevScript = scripts["dev"]?.GetValue<string>(); 356originalBuildScript = scripts["build"]?.GetValue<string>(); 357originalPreviewScript = scripts["preview"]?.GetValue<string>(); 358originalPackageType = packageJson["type"]?.GetValue<string>(); 387Assert.Equal(originalDevScript, scripts["dev"]?.GetValue<string>()); 388Assert.Equal(originalBuildScript, scripts["build"]?.GetValue<string>()); 389Assert.Equal(originalPreviewScript, scripts["preview"]?.GetValue<string>()); 390Assert.Equal("custom-apphost-start", scripts["aspire:start"]?.GetValue<string>()); 391Assert.Equal("npm --prefix aspire-apphost run aspire:build", scripts["aspire:build"]?.GetValue<string>()); 392Assert.Equal("npm --prefix aspire-apphost run aspire:dev", scripts["aspire:dev"]?.GetValue<string>()); 393Assert.Equal(originalPackageType, packageJson["type"]?.GetValue<string>()); 413Assert.Equal("module", appHostPackageJson["type"]?.GetValue<string>()); 414Assert.Equal("aspire-apphost", appHostPackageJson["name"]?.GetValue<string>()); 415Assert.Equal("aspire run", appHostScripts["aspire:start"]?.GetValue<string>()); 427Assert.Equal("aspire-apphost/apphost.mts", appHost["path"]?.GetValue<string>());
Aspire.Cli.Tests (219)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (6)
71Assert.Equal("local", aspireServer["type"]?.GetValue<string>()); 72Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>()); 77Assert.Equal("agent", args[0]?.GetValue<string>()); 78Assert.Equal("mcp", args[1]?.GetValue<string>()); 84Assert.Equal("${DOTNET_ROOT}", env["DOTNET_ROOT"]?.GetValue<string>()); 90Assert.Equal("*", tools[0]?.GetValue<string>());
Agents\VsCodeAgentEnvironmentScannerTests.cs (6)
157Assert.Equal("stdio", aspireServer["type"]?.GetValue<string>()); 158Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>()); 163Assert.Equal("agent", args[0]?.GetValue<string>()); 164Assert.Equal("mcp", args[1]?.GetValue<string>()); 250Assert.Equal("stdio", aspireServer["type"]?.GetValue<string>()); 251Assert.Equal("aspire", aspireServer["command"]?.GetValue<string>());
Backchannel\ResourceSnapshotMapperTests.cs (3)
31Assert.Equal(12345, pid.GetValue<int>()); 354value => Assert.Equal("one", value?.GetValue<string>()), 355value => Assert.Equal("two", value?.GetValue<string>()));
Commands\InitCommandTests.cs (31)
170Assert.Equal("apphost.cs", appHost["path"]!.GetValue<string>()); 200Assert.Equal("Project", https["commandName"]!.GetValue<string>()); 201Assert.True(https["dotnetRunMessages"]!.GetValue<bool>()); 202var httpsUrls = https["applicationUrl"]!.GetValue<string>(); 205Assert.Equal("Development", httpsEnv[KnownAspNetCoreConfigNames.Environment]!.GetValue<string>()); 206Assert.Equal("Development", httpsEnv[KnownAspNetCoreConfigNames.DotNetEnvironment]!.GetValue<string>()); 207Assert.StartsWith("https://localhost:", httpsEnv["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]!.GetValue<string>()); 208Assert.StartsWith("https://localhost:", httpsEnv["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]!.GetValue<string>()); 211Assert.Equal("Project", http["commandName"]!.GetValue<string>()); 213Assert.Equal("Development", httpEnv[KnownAspNetCoreConfigNames.Environment]!.GetValue<string>()); 214Assert.StartsWith("http://localhost:", httpEnv["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]!.GetValue<string>()); 215Assert.StartsWith("http://localhost:", httpEnv["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]!.GetValue<string>()); 216Assert.Equal("true", httpEnv["ASPIRE_ALLOW_UNSECURED_TRANSPORT"]!.GetValue<string>()); 223aspireProfiles["https"]!["applicationUrl"]!.GetValue<string>(), 226aspireProfiles["http"]!["applicationUrl"]!.GetValue<string>(), 227http["applicationUrl"]!.GetValue<string>()); 279Assert.Equal("https://localhost:18000;http://localhost:18001", https["applicationUrl"]!.GetValue<string>()); 280Assert.Equal("https://localhost:18002", https["environmentVariables"]!["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]!.GetValue<string>()); 281Assert.Equal("https://localhost:18003", https["environmentVariables"]!["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]!.GetValue<string>()); 282Assert.Equal("http://localhost:18001", http["applicationUrl"]!.GetValue<string>()); 283Assert.Equal("http://localhost:18005", http["environmentVariables"]!["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]!.GetValue<string>()); 284Assert.Equal("http://localhost:18006", http["environmentVariables"]!["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]!.GetValue<string>()); 331Assert.Equal("https://localhost:18000", preservedHttps["applicationUrl"]!.GetValue<string>()); 333Assert.Equal("custom-value", preservedEnv["MY_CUSTOM_VAR"]!.GetValue<string>()); 401Assert.Equal("apphost.mts", appHost["path"]!.GetValue<string>()); 402Assert.Equal("typescript/nodejs", appHost["language"]!.GetValue<string>()); 689Assert.Equal("apphost.cs", merged["appHost"]!.AsObject()["path"]!.GetValue<string>()); 691Assert.Equal("stable", merged["channel"]!.GetValue<string>()); 692Assert.True(merged["features"]!.AsObject()["polyglotSupportEnabled"]!.GetValue<bool>()); 1140Assert.Equal(contextChannel, config["channel"]!.GetValue<string>()); 1173Assert.Equal("pr-99999", config["channel"]!.GetValue<string>());
Commands\OperatingSystemCheckTests.cs (8)
28Assert.Equal("Linux", result.Metadata["osType"]!.GetValue<string>()); 29Assert.Equal("Linux Ubuntu", result.Metadata["displayName"]!.GetValue<string>()); 30Assert.Equal("24.04", result.Metadata["version"]!.GetValue<string>()); 31Assert.Equal("Ubuntu 24.04.2 LTS", result.Metadata["description"]!.GetValue<string>()); 50Assert.Equal("unknown", result.Metadata["osType"]!.GetValue<string>()); 51Assert.Equal("unknown", result.Metadata["displayName"]!.GetValue<string>()); 52Assert.Equal("1.2.3", result.Metadata["version"]!.GetValue<string>()); 53Assert.Equal("Unknown OS description", result.Metadata["description"]!.GetValue<string>());
Commands\ResourceCommandHelperTests.cs (1)
143Assert.Equal("#submit", connection.ExecuteResourceCommandArguments["selector"]!.GetValue<string>());
Commands\ResourceCommandTests.cs (5)
1768Assert.Equal("browser", argumentInputs[0]!["name"]!.GetValue<string>()); 1769Assert.Equal("Chrome", argumentInputs[0]!["value"]!.GetValue<string>()); 1770Assert.Equal("profile", argumentInputs[1]!["name"]!.GetValue<string>()); 1771Assert.Equal("Default", argumentInputs[1]!["options"]!["Default"]!.GetValue<string>()); 2297Assert.Equal(value, actualElement.GetValue<string>());
Commands\TelemetryTracesCommandTests.cs (3)
141Assert.Equal("abc1234567890def", item["traceId"]!.GetValue<string>()); 143var dashboardUrl = item["dashboardUrl"]!.GetValue<string>(); 229var dashboardUrl = items[0]!["dashboardUrl"]!.GetValue<string>();
Commands\VsCodeExtensionCheckTests.cs (6)
51Assert.True(result.Metadata["vsCodeInstalled"]!.GetValue<bool>()); 52Assert.False(result.Metadata["extensionInstalled"]!.GetValue<bool>()); 53Assert.Equal(VsCodeExtensionCheck.ExtensionId, result.Metadata["extensionId"]!.GetValue<string>()); 80Assert.True(result.Metadata["vsCodeInstalled"]!.GetValue<bool>()); 81Assert.True(result.Metadata["extensionInstalled"]!.GetValue<bool>()); 82Assert.Equal(VsCodeExtensionCheck.ExtensionId, result.Metadata["extensionId"]!.GetValue<string>());
Configuration\ConfigurationServiceTests.cs (3)
313Assert.Equal("true", node.GetValue<string>()); 336Assert.Equal("true", node.GetValue<string>()); 356Assert.Equal("daily", node.GetValue<string>());
Mcp\ExecuteResourceCommandToolTests.cs (4)
92Assert.Equal("#submit", connection.ExecuteResourceCommandArguments["selector"]!.GetValue<string>()); 113Assert.Equal("3", connection.ExecuteResourceCommandArguments["count"]!.GetValue<string>()); 114Assert.Equal("true", connection.ExecuteResourceCommandArguments["urgent"]!.GetValue<string>()); 115Assert.Equal("1.5", connection.ExecuteResourceCommandArguments["ratio"]!.GetValue<string>());
Mcp\ListStructuredLogsToolTests.cs (9)
199Assert.Equal("api-service-instance-1", firstLog["resourceName"]?.GetValue<string>()); 200Assert.Equal(42, firstLog["logId"]?.GetValue<long>()); 207Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=42", firstLog["dashboardUrl"]?.GetValue<string>()); 212Assert.Equal("api-service-instance-2", secondLog["resourceName"]?.GetValue<string>()); 213Assert.Equal(43, secondLog["logId"]?.GetValue<long>()); 218Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=43", secondLog["dashboardUrl"]?.GetValue<string>()); 223Assert.Equal("worker-service", thirdLog["resourceName"]?.GetValue<string>()); 224Assert.Equal(44, thirdLog["logId"]?.GetValue<long>()); 226Assert.Equal("http://localhost:18888/structuredlogs?logEntryId=44", thirdLog["dashboardUrl"]?.GetValue<string>());
Mcp\ListTracesToolTests.cs (11)
172Assert.Equal("abc123def456789012345678901234567890", firstTrace["traceId"]?.GetValue<string>()); 180Assert.Equal("http://localhost:18888/traces/detail/abc123def456789012345678901234567890", firstTrace["dashboardUrl"]?.GetValue<string>()); 183var serverSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Server")?.AsObject(); 185Assert.Equal("api-service-instance-1", serverSpan["source"]?.GetValue<string>()); 189var clientSpan = spans.FirstOrDefault(s => s?["kind"]?.GetValue<string>() == "Client")?.AsObject(); 191Assert.Equal("api-service-instance-2", clientSpan["source"]?.GetValue<string>()); 192Assert.Equal("catalog-service", clientSpan["destination"]?.GetValue<string>()); 197Assert.Equal("xyz789abc123456789012345678901234567890", secondTrace["traceId"]?.GetValue<string>()); 199Assert.Equal("http://localhost:18888/traces/detail/xyz789abc123456789012345678901234567890", secondTrace["dashboardUrl"]?.GetValue<string>()); 209Assert.Equal("Internal", internalSpan["kind"]?.GetValue<string>()); 210Assert.Equal("worker-service", internalSpan["source"]?.GetValue<string>());
Migrations\TypeScriptAppHostMigrationTests.cs (7)
62Assert.Equal(KnownLanguageId.TypeScript, descriptor.Metadata["language"]!.GetValue<string>()); 63Assert.Equal(appHostPath, descriptor.Metadata["appHostPath"]!.GetValue<string>()); 113Assert.Equal(appHostPath, descriptor.Metadata!["appHostPath"]!.GetValue<string>()); 190Assert.Equal("apphost.mts", config["appHost"]!["path"]!.GetValue<string>()); 193var includes = tsconfig["include"]!.AsArray().Select(n => n!.GetValue<string>()).ToArray(); 198Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]!.GetValue<string>()); 199Assert.Equal("eslint apphost.mts", scripts["aspire:lint"]!.GetValue<string>());
Scaffolding\PackageJsonMergerTests.cs (95)
22ParseJson(mergedJson)["scripts"]![scriptName]?.GetValue<string>()!; 28ParseJson(mergedJson)[section]?[packageName]?.GetValue<string>(); 57Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 58Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 61Assert.Equal("aspire run", scripts["aspire:dev"]?.GetValue<string>()); 62Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 65Assert.Equal("eslint apphost.ts", scripts["lint"]?.GetValue<string>()); 94Assert.Equal("jest", scripts["test"]?.GetValue<string>()); 97Assert.Equal("aspire run", scripts["dev"]?.GetValue<string>()); 98Assert.Equal("tsc -p tsconfig.apphost.json", scripts["build"]?.GetValue<string>()); 99Assert.Equal("eslint apphost.ts", scripts["lint"]?.GetValue<string>()); 131Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 132Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 135Assert.Equal("custom start", scripts["aspire:start"]?.GetValue<string>()); 136Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 137Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["aspire:dev"]?.GetValue<string>()); 138Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 169Assert.Equal("npm run aspire:start", scripts["start"]?.GetValue<string>()); 170Assert.Equal("npm run aspire:lint", scripts["lint"]?.GetValue<string>()); 173Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 174Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 201Assert.Equal("yarn run aspire:start", scripts["start"]?.GetValue<string>()); 233Assert.Equal("node server.js", scripts["start"]?.GetValue<string>()); 234Assert.Equal("prettier --check .", scripts["lint"]?.GetValue<string>()); 235Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 236Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 239Assert.Equal("aspire run", scripts["aspire:start"]?.GetValue<string>()); 240Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 241Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 245Assert.Equal("node server.js", scripts["start"]?.GetValue<string>()); 246Assert.Equal("prettier --check .", scripts["lint"]?.GetValue<string>()); 276Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 277Assert.Equal("jest", scripts["test"]?.GetValue<string>()); 280Assert.Equal("aspire run", scripts["aspire:dev"]?.GetValue<string>()); 283Assert.Equal("tsc -p tsconfig.apphost.json", scripts["build"]?.GetValue<string>()); 286Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 287Assert.Equal("npm run aspire:lint", scripts["lint"]?.GetValue<string>()); 369Assert.Equal("my-existing-app", json["name"]?.GetValue<string>()); 370Assert.Equal("3.0.0", json["version"]?.GetValue<string>()); 371Assert.Equal("My cool app", json["description"]?.GetValue<string>()); 372Assert.True(json["private"]?.GetValue<bool>()); 373Assert.Equal("module", json["type"]?.GetValue<string>()); 376Assert.Equal("^20.19.0 || ^22.13.0 || >=24", json["engines"]?["node"]?.GetValue<string>()); 444Assert.Equal("my-app", json["name"]?.GetValue<string>()); 518Assert.Equal("aspire run", scripts["dev"]?.GetValue<string>()); 519Assert.Equal("tsc -p tsconfig.apphost.json", scripts["build"]?.GetValue<string>()); 520Assert.Equal("eslint apphost.ts", scripts["lint"]?.GetValue<string>()); 576Assert.Equal("vite-project", json["name"]?.GetValue<string>()); 577Assert.Equal("1.0.0", json["version"]?.GetValue<string>()); 580Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 581Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 582Assert.Equal("eslint . --ext .ts,.tsx", scripts["lint"]?.GetValue<string>()); 583Assert.Equal("vite preview", scripts["preview"]?.GetValue<string>()); 586Assert.Equal("aspire run", scripts["aspire:dev"]?.GetValue<string>()); 587Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 588Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 591Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["watch"]?.GetValue<string>()); 634Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 635Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 638Assert.Equal("aspire run", scripts["aspire:start"]?.GetValue<string>()); 639Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 640Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["aspire:dev"]?.GetValue<string>()); 641Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 644Assert.Equal("npm run aspire:start", scripts["start"]?.GetValue<string>()); 645Assert.Equal("npm run aspire:lint", scripts["lint"]?.GetValue<string>()); 648Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 649Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 698Assert.Equal("tsc && vite build", scripts["build"]?.GetValue<string>()); 699Assert.Equal("concurrently \"tsc -w\" \"vite\"", scripts["dev"]?.GetValue<string>()); 700Assert.Equal("vitest run && echo 'done'", scripts["test"]?.GetValue<string>()); 701Assert.Equal("eslint . --ext .ts,.tsx && prettier --check .", scripts["lint"]?.GetValue<string>()); 702Assert.Equal("rm -rf dist && rm -rf node_modules/.cache", scripts["clean"]?.GetValue<string>()); 703Assert.Equal("node server.js | tee output.log", scripts["start"]?.GetValue<string>()); 1018Assert.Equal("scaffold", ParseJson(result)["name"]?.GetValue<string>()); 1147Assert.Equal("^20.19.0 || ^22.13.0 || >=24", engines["node"]?.GetValue<string>()); 1175Assert.Equal("^20.19.0 || ^22.13.0 || >=24", engines["node"]?.GetValue<string>()); 1177Assert.Equal(">=8", engines["npm"]?.GetValue<string>()); 1200Assert.Equal("^20.19.0 || ^22.13.0 || >=24", engines["node"]?.GetValue<string>()); 1226Assert.Equal("web", keywords[0]!.GetValue<string>()); 1227Assert.Equal("api", keywords[1]!.GetValue<string>()); 1231Assert.Equal("dist/**", files[0]!.GetValue<string>()); 1278Assert.Equal("my-project", doc["name"]!.GetValue<string>()); 1279Assert.Equal("ISC", doc["license"]!.GetValue<string>()); 1296Assert.Contains(">=24", doc["engines"]?["node"]?.GetValue<string>()); 1463Assert.Equal("vite-brownfield", doc["name"]!.GetValue<string>()); 1464Assert.Equal("2.0.0", doc["version"]!.GetValue<string>()); 1465Assert.Equal("module", doc["type"]!.GetValue<string>()); 1469Assert.Equal("vite", scripts["dev"]?.GetValue<string>()); 1470Assert.Equal("vite build", scripts["build"]?.GetValue<string>()); 1471Assert.Equal("vite preview", scripts["preview"]?.GetValue<string>()); 1474Assert.Equal("aspire run", scripts["aspire:start"]?.GetValue<string>()); 1475Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 1476Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["aspire:dev"]?.GetValue<string>()); 1477Assert.Equal("eslint apphost.ts", scripts["aspire:lint"]?.GetValue<string>()); 1492Assert.Contains(">=24", doc["engines"]?["node"]?.GetValue<string>());
Scaffolding\ScaffoldingServiceTests.cs (16)
127Assert.Equal("vitest", scripts["test"]?.GetValue<string>()); 128Assert.Equal("pnpm --dir apps/web/aspire-apphost run aspire:start", scripts["aspire:start"]?.GetValue<string>()); 129Assert.Equal("pnpm --dir apps/web/aspire-apphost run aspire:build", scripts["aspire:build"]?.GetValue<string>()); 130Assert.Equal("pnpm --dir apps/web/aspire-apphost run aspire:dev", scripts["aspire:dev"]?.GetValue<string>()); 153Assert.Equal("pnpm --dir aspire-apphost run aspire:start", scripts["aspire:start"]?.GetValue<string>()); 154Assert.Equal("pnpm --dir aspire-apphost run aspire:build", scripts["aspire:build"]?.GetValue<string>()); 155Assert.Equal("pnpm --dir aspire-apphost run aspire:dev", scripts["aspire:dev"]?.GetValue<string>()); 179Assert.Equal("custom-start", scripts["aspire:start"]?.GetValue<string>()); 180Assert.Equal("npm --prefix aspire-apphost run aspire:build", scripts["aspire:build"]?.GetValue<string>()); 181Assert.Equal("npm --prefix aspire-apphost run aspire:dev", scripts["aspire:dev"]?.GetValue<string>()); 308Assert.True(merged["editor.formatOnSave"]!.GetValue<bool>()); 310Assert.Equal("automatic", merged["java.compile.nullAnalysis.mode"]!.GetValue<string>()); 311Assert.Equal([".", ".aspire/modules"], merged["java.project.sourcePaths"]!.AsArray().Select(v => v!.GetValue<string>())); 333merged["java.project.sourcePaths"]!.AsArray().Select(v => v!.GetValue<string>())); 355Assert.Equal(4, merged["editor.tabSize"]!.GetValue<int>()); 356Assert.Equal(["."], merged["java.project.sourcePaths"]!.AsArray().Select(v => v!.GetValue<string>()));
Utils\DevCertsCheckTests.cs (3)
309Assert.Equal("AAAA1111BBBB2222", certNode["thumbprint"]!.GetValue<string>()); 310Assert.Equal(MinVersion, certNode["version"]!.GetValue<int>()); 311Assert.Equal("full", certNode["trustLevel"]!.GetValue<string>());
Utils\EnvironmentCheckerTests.cs (2)
61Assert.Equal(nameof(TestEnvironmentCheck), timeoutResult.Metadata!["checkType"]!.GetValue<string>()); 62Assert.Equal(0.1, timeoutResult.Metadata["timeoutSeconds"]!.GetValue<double>());
Aspire.Dashboard (10)
Model\GenAI\GenAIItemPartViewModel.cs (2)
90? toolCallResponsePart.Response.GetValue<string>() 126? serverToolCallResponsePart.ServerToolCallResponse.GetValue<string>()
Model\GenAI\GenAIMessageParsingHelper.cs (1)
147if (node?.GetValueKind() == JsonValueKind.String && node.GetValue<string>() is { } json)
Model\GenAI\GenAISchemaHelpers.cs (4)
23Description = schemaObj["description"]?.GetValue<string>() 53schema.Required.Add(item.GetValue<string>()); 96var typeValue = item.GetValue<string>(); 112var typeString = typeNode.GetValue<string>();
Model\GenAI\GenAIVisualizerDialogViewModel.cs (3)
104Type = obj["type"]?.GetValue<string>() ?? "function", 105Name = obj["name"]?.GetValue<string>(), 106Description = obj["description"]?.GetValue<string>()
Aspire.Dashboard.Tests (15)
Model\GenAIMessageParsingHelperTests.cs (6)
138Assert.Equal("Seattle", toolCallPart.Arguments["location"]!.GetValue<string>()); 153Assert.Equal("Seattle", toolCallPart.Arguments["location"]!.GetValue<string>()); 168Assert.Equal(72, objectResponse.Response!["temperature"]!.GetValue<int>()); 172Assert.Equal("plain text result", stringResponse.Response!.GetValue<string>()); 246Assert.Equal("latest news", serverToolCallPart.ServerToolCall["query"]!.GetValue<string>()); 261Assert.Equal("web_search", serverToolCallResponsePart.ServerToolCallResponse["type"]!.GetValue<string>());
Model\GenAIVisualizerDialogViewModelTests.cs (2)
1194Assert.Equal("celsius", unitProp.Enum[0]!.GetValue<string>()); 1195Assert.Equal("fahrenheit", unitProp.Enum[1]!.GetValue<string>());
Model\TelemetryExportServiceTests.cs (7)
1434Assert.Equal("dependency-resource", waitingForPropertyValue?.GetValue<string>()); 1436Assert.Equal("localhost", connectionPropertiesObject["Host"]?.GetValue<string>()); 1437Assert.Equal("catalogdb", connectionPropertiesObject["DatabaseName"]?.GetValue<string>()); 1568Assert.Equal(6379, portsArray[0]!.GetValue<double>()); 1569Assert.Equal(6380, portsArray[1]!.GetValue<double>()); 1572var exitCode = deserialized.Properties["resource.exitCode"]!.GetValue<double>(); 1576var enabled = deserialized.Properties["resource.enabled"]!.GetValue<bool>();
Aspire.Hosting (13)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
416JsonValueKind.String => value.GetValue<string>(),
Dashboard\DashboardEventHandlers.cs (3)
161frameworkObj["name"]?.GetValue<string>() is { } name && 162frameworkObj["version"]?.GetValue<string>() is { } version) 254frameworkObj["name"]?.GetValue<string>() is { } name)
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
200value = jsonValue.GetValue<string>();
Pipelines\Internal\FileDeploymentStateManager.cs (3)
748var legacyFallbackDisabled = migrationState[LegacyFallbackDisabledProperty]?.GetValue<bool>() ?? false; 764JsonValue stateValue => JsonNode.Parse(stateValue.GetValue<string>())?.AsObject() 775claimedSectionsValue.GetValue<string>());
Publishing\ContainerRuntimeBase.cs (5)
197root["WorkingDir"]?.GetValue<string>()); 220if (item?.GetValue<string>() is { } value) 308var actualOperatingSystem = platform?["os"]?.GetValue<string>(); 309var actualArchitecture = platform?["architecture"]?.GetValue<string>(); 310var digest = descriptor["digest"]?.GetValue<string>();
Aspire.Hosting.Azure (53)
AzureProvisioningController.cs (27)
1857var subscriptionId = section.Data["SubscriptionId"]?.GetValue<string>(); 1858var resourceGroupName = section.Data["ResourceGroup"]?.GetValue<string>(); 2499deployment.TryGetPropertyValue("resourceId", out var resourceIdNode) ? resourceIdNode?.GetValue<string>() : null, 2510var deploymentId = section.Data["Id"]?.GetValue<string>(); 2514var outputs = ParseDeploymentStateJson(resource.Name, "Outputs", section.Data["Outputs"]?.GetValue<string>()); 2524["locationOverride"] = section.Data[LocationOverrideKey]?.GetValue<string>(), 2525["checksum"] = section.Data["CheckSum"]?.GetValue<string>(), 2527["scope"] = ParseDeploymentStateJson(resource.Name, "Scope", section.Data["Scope"]?.GetValue<string>()) 2533if (section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>() is { Length: > 0 } provisioningState) 2745if (section.Data[LocationOverrideKey]?.GetValue<string>() is { Length: > 0 } locationOverride) 2764if (section.Data[LocationOverrideKey]?.GetValue<string>() is { Length: > 0 } locationOverride) 3092=> section.Data["Id"]?.GetValue<string>() is { Length: > 0 } deploymentId ? deploymentId : null; 3096section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>(), 3157if (section.Data["Parameters"]?.GetValue<string>() is not { Length: > 0 } parametersJson) 3164var persistedLocation = AzureProvisioningJsonHelpers.ParseDeploymentStateJson(parametersJson)?[AzureBicepResource.KnownParameters.Location]?["value"]?.GetValue<string>(); 3188=> section.Data[LocationOverrideKey]?.GetValue<string>() is { Length: > 0 } locationOverride ? locationOverride : null; 3371section.Data["SubscriptionId"]?.GetValue<string>() ?? provisionerOptions.Value.SubscriptionId ?? configuration["Azure:SubscriptionId"], 3372section.Data["ResourceGroup"]?.GetValue<string>() ?? provisionerOptions.Value.ResourceGroup ?? configuration["Azure:ResourceGroup"], 3373section.Data["Location"]?.GetValue<string>() ?? provisionerOptions.Value.Location ?? configuration["Azure:Location"], 3374section.Data["TenantId"]?.GetValue<string>() ?? provisionerOptions.Value.TenantId ?? configuration["Azure:TenantId"], 3375section.Data["Tenant"]?.GetValue<string>()); 3393if (section.Data["Outputs"]?.GetValue<string>() is not { Length: > 0 } outputsJson) 3402return AzureProvisioningJsonHelpers.ParseDeploymentStateJson(outputsJson)?["id"]?["value"]?.GetValue<string>(); 3512if (section.Data[LocationOverrideKey]?.GetValue<string>() is { Length: > 0 } locationOverride) 3519if (section.Data["Parameters"]?.GetValue<string>() is not { Length: > 0 } parametersJson) 3526return AzureProvisioningJsonHelpers.ParseDeploymentStateJson(parametersJson)?[AzureBicepResource.KnownParameters.Location]?["value"]?.GetValue<string>(); 3815section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>(),
Provisioning\BicepUtilities.cs (2)
171if (section.Data[DeploymentStateParametersKey]?.GetValue<string>() is not { Length: > 0 } jsonString) 179var scope = section.Data[DeploymentStateScopeKey]?.GetValue<string>() is { Length: > 0 } scopeString
Provisioning\Internal\RunModeProvisioningContextProvider.cs (5)
237if (data["Location"]?.GetValue<string>() is { Length: > 0 } location) 242if (data["SubscriptionId"]?.GetValue<string>() is { Length: > 0 } subscriptionId) 247if (data["ResourceGroup"]?.GetValue<string>() is { Length: > 0 } resourceGroup) 252if (data["TenantId"]?.GetValue<string>() is { Length: > 0 } tenantId) 269JsonValueKind.String when bool.TryParse(value.GetValue<string>(), out var parsedValue) => parsedValue,
Provisioning\Provisioners\BicepProvisioner.cs (19)
60if (stateSection.Data[DeploymentStateProvisioningStateKey]?.GetValue<string>() is { Length: > 0 } provisioningState && 68var configCheckSum = stateSection.Data[BicepUtilities.DeploymentStateChecksumKey]?.GetValue<string>(); 84if (stateSection.Data[BicepUtilities.DeploymentStateOutputsKey]?.GetValue<string>() is { Length: > 0 } outputJson) 119if (stateSection.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>() is { Length: > 0 } configuredDeploymentId && 187stateSection.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>() is not { Length: > 0 } deploymentId || 358stateSection.Data[BicepUtilities.DeploymentStateChecksumKey]?.GetValue<string>() is not { Length: > 0 } checksum) 375var locationOverride = stateSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>(); 455var locationOverride = stateSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>(); 476if (stateSection.Data[key]?.GetValue<string>() is not { Length: > 0 } json) 495stateSection.Data[DeploymentStateProvisioningStateKey]?.GetValue<string>(), 622var canceledLocationOverride = canceledStateSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>(); 679locationOverride = stateSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>(); 797locationOverride = stateSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>(); 855var cachedDeploymentId = stateSection.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>(); 856var cachedChecksum = stateSection.Data[BicepUtilities.DeploymentStateChecksumKey]?.GetValue<string>(); 1487section.Data[key]?.GetValue<string>() is { Length: > 0 } value ? value : null; 1491if (section.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>() is { Length: > 0 } locationOverride) 1496if (section.Data[BicepUtilities.DeploymentStateParametersKey]?.GetValue<string>() is { Length: > 0 } parametersJson) 1500if (JsonNode.Parse(parametersJson)?[AzureBicepResource.KnownParameters.Location]?["value"]?.GetValue<string>() is { Length: > 0 } configuredLocation)
Aspire.Hosting.Azure.Sandboxes (31)
AzureSandboxContainerDeployment.cs (28)
247var previousOwnerId = previousStateSection.Data["OwnerId"]?.GetValue<string>(); 377var pendingSecurityCleanup = previousStateSection.Data["PendingSecurityCleanup"]?.GetValue<bool>() == true; 481if (portStates.FirstOrDefault() is JsonObject firstPort && firstPort["Url"]?.GetValue<string>() is { } publicUrl) 1280var ownerId = stateSection.Data["OwnerId"]?.GetValue<string>(); 1396if (stateSection.Data["OwnerId"]?.GetValue<string>() is { Length: > 0 } ownerId && 1412stateSection.Data["OwnerId"]?.GetValue<string>())) 1515var sandboxId = stateSection.Data["SandboxId"]?.GetValue<string>(); 1528var diskImageId = stateSection.Data["DiskImageId"]?.GetValue<string>(); 1793if (stateSection.Data["ResourceName"]?.GetValue<string>() is { Length: > 0 } resourceName) 1856if (stateSection.Data["OwnerId"]?.GetValue<string>() is { Length: > 0 } previousOwnerId && 1890if (stateSection.Data["OwnerId"]?.GetValue<string>() is { Length: > 0 } previousOwnerId && 1993previousStateSection.Data["HasRuntimeEnvironmentConfiguration"]?.GetValue<bool>() == true || 1995previousStateSection.Data["HasRuntimeCommandConfiguration"]?.GetValue<bool>() == true) 2000if (previousStateSection.Data["PendingSecurityCleanup"]?.GetValue<bool>() == true) 2005var previousFingerprint = previousStateSection.Data["EndpointSecurityFingerprint"]?.GetValue<string>(); 2034var subscriptionId = stateSection.Data["SubscriptionId"]?.GetValue<string>(); 2035var resourceGroup = stateSection.Data["ResourceGroup"]?.GetValue<string>(); 2036var location = stateSection.Data["Location"]?.GetValue<string>(); 2037var sandboxGroup = stateSection.Data["SandboxGroup"]?.GetValue<string>(); 2058!string.IsNullOrWhiteSpace(stateSection.Data["OwnerId"]?.GetValue<string>()) || 2059!string.IsNullOrWhiteSpace(stateSection.Data["SandboxId"]?.GetValue<string>()) || 2060!string.IsNullOrWhiteSpace(stateSection.Data["DiskImageId"]?.GetValue<string>()); 2082if (port["Url"]?.GetValue<string>() is { Length: > 0 } url) 2098if (previousStateSection.Data["DeployId"]?.GetValue<string>() is { Length: > 0 } previousDeployId) 2113if (previousStateSection.Data[stateKey]?.GetValue<string>() is { Length: > 0 } previousId) 2127if (port["Port"]?.GetValue<int>() is { } portNumber) 2136if (stateSection.Data["Port"]?.GetValue<int>() is { } legacyPort) 2267var value = section.Data[name]?.GetValue<string>();
AzureSandboxEndpointPropertyValueProvider.cs (3)
131if (port["Port"]?.GetValue<int>() == _sandboxEndpoint.TargetPort) 136if (string.Equals(port["Name"]?.GetValue<string>(), _sandboxEndpoint.Name, StringComparison.Ordinal)) 147url = port["Url"]?.GetValue<string>();
Aspire.Hosting.Azure.Tests (151)
AzureBicepProvisionerTests.cs (18)
1021Assert.Equal("westus3", section.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 1083Assert.Equal("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/test-rg/providers/Microsoft.Resources/deployments/storage2", section.Data["Id"]?.GetValue<string>()); 1084Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateRunning, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1338Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1371Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1403Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1438Assert.Equal(deploymentId, section.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>()); 1496Assert.Equal(ResourcesProvisioningState.Failed.ToString(), section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1598Assert.Equal(deploymentId, section.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>()); 1599var outputs = JsonNode.Parse(section.Data[BicepUtilities.DeploymentStateOutputsKey]!.GetValue<string>())!.AsObject(); 1600Assert.Equal("https://storage.blob.core.windows.net/", outputs["blobEndpoint"]?["value"]?.GetValue<string>()); 1678Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateRunning, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1679Assert.Equal(deploymentId, section.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>()); 1707Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateRunning, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1708Assert.Equal(deploymentId, section.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>()); 1733Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateFailed, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1758Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, section.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1792Assert.Equal(deploymentId, section.Data[BicepUtilities.DeploymentStateIdKey]?.GetValue<string>());
AzureEnvironmentResourceExtensionsTests.cs (126)
368Assert.Contains("orphaned", resultData["warning"]?.GetValue<string>(), StringComparison.Ordinal); 370Assert.Contains(recommendedActions, action => action?["code"]?.GetValue<string>() == "delete-live-resources"); 762Assert.Equal(1, data["resourceCount"]?.GetValue<int>()); 842Assert.Equal(AzureProvisioningController.GetAzureResourceCommandName, data["command"]?.GetValue<string>()); 843Assert.Equal("storage", data["resourceName"]?.GetValue<string>()); 844Assert.Equal("westus2", data["azureLocation"]?.GetValue<string>()); 845Assert.Equal("westus3", data["location"]?.GetValue<string>()); 846Assert.Equal("westus3", data["effectiveLocation"]?.GetValue<string>()); 851Assert.Equal(subscriptionId, azureContext["subscriptionId"]?.GetValue<string>()); 852Assert.Equal(tenantId, azureContext["tenantId"]?.GetValue<string>()); 853Assert.Equal(resourceGroup, azureContext["resourceGroup"]?.GetValue<string>()); 854Assert.Equal("westus2", azureContext["location"]?.GetValue<string>()); 857Assert.True(deployment["hasState"]?.GetValue<bool>()); 858Assert.Equal(deploymentId, deployment["deploymentId"]?.GetValue<string>()); 859Assert.Equal(resourceId, deployment["resourceId"]?.GetValue<string>()); 860Assert.Equal("westus3", deployment["locationOverride"]?.GetValue<string>()); 861Assert.Equal("checksum", deployment["checksum"]?.GetValue<string>()); 862Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateRunning, deployment["provisioningState"]?.GetValue<string>()); 863Assert.Contains("/DeploymentDetailsBlade/", deployment["deploymentPortalUrl"]?.GetValue<string>()); 864Assert.Contains("/resource/subscriptions/", deployment["resourcePortalUrl"]?.GetValue<string>()); 867Assert.Equal("https://storage.blob.core.windows.net/", outputs["blobEndpoint"]?["value"]?.GetValue<string>()); 870Assert.Equal(resourceGroup, scope["resourceGroup"]?.GetValue<string>()); 873Assert.True(live["checked"]?.GetValue<bool>()); 874Assert.True(live["exists"]?.GetValue<bool>()); 926Assert.True(live["checked"]?.GetValue<bool>()); 927Assert.False(live["exists"]?.GetValue<bool>()); 928Assert.Equal("missing-live-resource", live["reason"]?.GetValue<string>()); 929Assert.Equal("azure", live["source"]?.GetValue<string>()); 930Assert.Equal("missing-live-resource", live["code"]?.GetValue<string>()); 931Assert.Contains("resource was not found in Azure", live["message"]?.GetValue<string>(), StringComparison.Ordinal); 933Assert.Contains(recommendedActions, action => action?["code"]?.GetValue<string>() == "reprovision-or-forget-state"); 987Assert.Equal("Microsoft.Storage/storageAccounts", json["resourceType"]?.GetValue<string>()); 988Assert.Equal("storage", json["resourceName"]?.GetValue<string>()); 989Assert.Equal(targetResourceId, json["targetResourceId"]?.GetValue<string>()); 1196Assert.True(deployment["hasState"]?.GetValue<bool>()); 1200Assert.False(live["checked"]?.GetValue<bool>()); 1202Assert.Equal("missing-resource-id", live["reason"]?.GetValue<string>()); 1203Assert.Equal("aspire", live["source"]?.GetValue<string>()); 1204Assert.Equal("missing-resource-id", live["code"]?.GetValue<string>()); 1205Assert.Contains("cached deployment state does not contain a resource ID", live["message"]?.GetValue<string>(), StringComparison.Ordinal); 1207Assert.Contains(recommendedActions, action => action?["code"]?.GetValue<string>() == "reprovision-or-change-context"); 1259Assert.True(live["checked"]?.GetValue<bool>()); 1261Assert.Equal("request-failed", live["reason"]?.GetValue<string>()); 1262Assert.Equal("azure", live["source"]?.GetValue<string>()); 1263Assert.Equal(403, live["status"]?.GetValue<int>()); 1264Assert.Equal("Azure", live["provider"]?.GetValue<string>()); 1265Assert.Equal(403, live["httpStatus"]?.GetValue<int>()); 1266Assert.Equal("AuthorizationFailed", live["errorCode"]?.GetValue<string>()); 1267Assert.Equal("live-resource-check", live["operation"]?.GetValue<string>()); 1268Assert.Contains("Forbidden", live["message"]?.GetValue<string>(), StringComparison.Ordinal); 1320Assert.True(live["checked"]?.GetValue<bool>()); 1322Assert.Equal("credential-unavailable", live["reason"]?.GetValue<string>()); 1323Assert.Contains("Credential unavailable", live["message"]?.GetValue<string>(), StringComparison.Ordinal); 1383Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, storageSection.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1517Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateCanceled, storageSection.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1721Assert.Equal(BicepProvisioner.DeploymentStateProvisioningStateSucceeded, storageSection.Data[BicepProvisioner.DeploymentStateProvisioningStateKey]?.GetValue<string>()); 1811Assert.Equal(2, resultData["deletedResourceCount"]?.GetValue<int>()); 1813Assert.Equal(deletedResourceIds, resultResourceIds.Select(static resourceId => resourceId!.GetValue<string>())); 1816Assert.Equal("westus3", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 1821Assert.Equal("storage2-deployment", storage2Section.Data["Id"]?.GetValue<string>()); 1902Assert.Equal(1, resultData["deletedResourceCount"]?.GetValue<int>()); 2130Assert.Equal("storage2-deployment", storage2Section.Data["Id"]?.GetValue<string>()); 2195Assert.Equal("storage2-deployment", storage2Section.Data["Id"]?.GetValue<string>()); 2804Assert.Equal("westus2", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 2851Assert.Equal("westus3", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 2854Assert.Equal(1, data["schemaVersion"]?.GetValue<int>()); 2855Assert.Equal(AzureProvisioningController.ChangeResourceLocationCommandName, data["command"]?.GetValue<string>()); 2856Assert.Equal("storage", data["resourceName"]?.GetValue<string>()); 2857Assert.Equal("westus3", data["location"]?.GetValue<string>()); 2858Assert.Equal("westus3", data["effectiveLocation"]?.GetValue<string>()); 2859Assert.Equal("eastus", data["azureLocation"]?.GetValue<string>()); 2861Assert.Equal("eastus", azureContext["location"]?.GetValue<string>()); 2909Assert.Equal("westus3", bicepSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3235Assert.Equal("westus3", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3297Assert.Equal("westus3", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3362Assert.Equal("westus3", storageSection.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3416Assert.Equal("12345678-1234-1234-1234-123456789012", azureSection.Data["SubscriptionId"]?.GetValue<string>()); 3417Assert.Equal("westus2", azureSection.Data["Location"]?.GetValue<string>()); 3418Assert.Equal("test-rg", azureSection.Data["ResourceGroup"]?.GetValue<string>()); 3419Assert.Equal("87654321-4321-4321-4321-210987654321", azureSection.Data["TenantId"]?.GetValue<string>()); 3462Assert.Equal("12345678-1234-1234-1234-123456789012", azureSection.Data["SubscriptionId"]?.GetValue<string>()); 3463Assert.Equal("westus3", azureSection.Data["Location"]?.GetValue<string>()); 3464Assert.Equal("cli-rg-é", azureSection.Data["ResourceGroup"]?.GetValue<string>()); 3465Assert.Equal("87654321-4321-4321-4321-210987654321", azureSection.Data["TenantId"]?.GetValue<string>()); 3468Assert.Equal(1, data["schemaVersion"]?.GetValue<int>()); 3469Assert.Equal(AzureProvisioningController.ChangeAzureContextCommandName, data["command"]?.GetValue<string>()); 3470Assert.Equal("12345678-1234-1234-1234-123456789012", data["subscriptionId"]?.GetValue<string>()); 3471Assert.Equal("87654321-4321-4321-4321-210987654321", data["tenantId"]?.GetValue<string>()); 3472Assert.Equal("cli-rg-é", data["resourceGroup"]?.GetValue<string>()); 3473Assert.Equal("westus3", data["azureLocation"]?.GetValue<string>()); 3475Assert.Equal("12345678-1234-1234-1234-123456789012", azureContext["subscriptionId"]?.GetValue<string>()); 3476Assert.Equal("87654321-4321-4321-4321-210987654321", azureContext["tenantId"]?.GetValue<string>()); 3477Assert.Equal("cli-rg-é", azureContext["resourceGroup"]?.GetValue<string>()); 3478Assert.Equal("westus3", azureContext["location"]?.GetValue<string>()); 3482Assert.Equal(1, data["resourceCount"]?.GetValue<int>()); 3583Assert.Equal("westus2", azureSection.Data["Location"]?.GetValue<string>()); 3678Assert.Equal("westus3", storage2Section.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3724Assert.Equal("westus3", storage2Section.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 3783Assert.Equal("westus3", storage2Section.Data[AzureProvisioningController.LocationOverrideKey]?.GetValue<string>()); 4026Assert.False(data["success"]?.GetValue<bool>()); 4029Assert.Equal("Microsoft.KeyVault", diagnostic["provider"]?.GetValue<string>()); 4030Assert.Equal("Microsoft.KeyVault/vaults", diagnostic["resourceType"]?.GetValue<string>()); 4031Assert.Equal("kv-test", diagnostic["resourceName"]?.GetValue<string>()); 4032Assert.Equal(keyVaultResourceId, diagnostic["targetResourceId"]?.GetValue<string>()); 4033Assert.Equal(AzureProvisioningFailureDetails.KeyVaultDeletedStateTombstoneNotFoundReason, diagnostic["errorCode"]?.GetValue<string>()); 4034Assert.Equal(409, diagnostic["httpStatus"]?.GetValue<int>()); 4035Assert.Contains("deleted vault was not found", diagnostic["errorMessage"]?.GetValue<string>(), StringComparison.Ordinal); 4037Assert.Contains(recommendedActions, action => action?["code"]?.GetValue<string>() == "retry-reprovision"); 4233Assert.False(data["success"]?.GetValue<bool>()); 4234Assert.Equal("failed", data["status"]?.GetValue<string>()); 4237Assert.Equal("azure", diagnostic["source"]?.GetValue<string>()); 4238Assert.Equal("Microsoft.ManagedIdentity", diagnostic["provider"]?.GetValue<string>()); 4239Assert.Equal("Microsoft.ManagedIdentity/userAssignedIdentities", diagnostic["resourceType"]?.GetValue<string>()); 4240Assert.Equal(400, diagnostic["httpStatus"]?.GetValue<int>()); 4241Assert.Equal("LocationNotAvailableForResourceType", diagnostic["errorCode"]?.GetValue<string>()); 4242Assert.Equal("provision", diagnostic["operation"]?.GetValue<string>()); 4244Assert.Contains(resultRecommendedActions, action => action?["code"]?.GetValue<string>() == "change-location"); 4539Assert.Equal("12345678-1234-1234-1234-123456789012", azureSection.Data["SubscriptionId"]?.GetValue<string>()); 4540Assert.Equal("westus2", azureSection.Data["Location"]?.GetValue<string>()); 4541Assert.Equal("test-rg", azureSection.Data["ResourceGroup"]?.GetValue<string>()); 4542Assert.Equal("87654321-4321-4321-4321-210987654321", azureSection.Data["TenantId"]?.GetValue<string>()); 4688Assert.Equal("storage-deployment", storageSection.Data["Id"]?.GetValue<string>()); 5555azureSection.Data["SubscriptionId"]?.GetValue<string>(), 5556azureSection.Data["ResourceGroup"]?.GetValue<string>(), 5557azureSection.Data["Location"]?.GetValue<string>(), 5558azureSection.Data["TenantId"]?.GetValue<string>());
AzureSandboxesTests.cs (3)
345Assert.Equal("existing-rg", rolesManifest["scope"]?["resourceGroup"]?.GetValue<string>()); 832Assert.Equal("production-sandbox", directCleanupState?["SandboxId"]?.GetValue<string>()); 833Assert.Equal("production-disk", directCleanupState?["DiskImageId"]?.GetValue<string>());
BicepUtilitiesTests.cs (2)
63Assert.Equal(20, parameters["age"]?["value"]?.GetValue<int>()); 422Assert.Null(scope["resourceGroup"]?.AsValue().GetValue<object>());
DefaultArmClientProviderTests.cs (1)
158Assert.Equal("https://storage.blob.core.windows.net/", deployment.Outputs?["blobEndpoint"]?["value"]?.GetValue<string>());
JsonExtensionsTests.cs (1)
23Assert.Equal("TestValue", retrievedNode["TestProperty"]!.GetValue<string>());
Aspire.Hosting.CodeGeneration.TypeScript.Tests (44)
AtsTypeScriptCodeGeneratorTests.cs (2)
42Assert.Equal("aspire-host", packageJson["name"]?.GetValue<string>()); 43Assert.Equal("module", packageJson["type"]?.GetValue<string>());
TypeScriptLanguageSupportTests.cs (42)
34Assert.Equal("brownfieldapp", packageJson["name"]?.GetValue<string>()); 35Assert.Equal("1.0.0", packageJson["version"]?.GetValue<string>()); 36Assert.True(packageJson["private"]?.GetValue<bool>()); 37Assert.Equal("module", packageJson["type"]?.GetValue<string>()); 38Assert.Equal("aspire run", scripts["aspire:start"]?.GetValue<string>()); 39Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 40Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["aspire:dev"]?.GetValue<string>()); 41Assert.Equal("eslint apphost.mts", scripts["aspire:lint"]?.GetValue<string>()); 42Assert.Equal("npm run aspire:lint", scripts["lint"]?.GetValue<string>()); 43Assert.Equal("npm run aspire:lint", scripts["predev"]?.GetValue<string>()); 44Assert.Equal("npm run aspire:start", scripts["dev"]?.GetValue<string>()); 45Assert.Equal("npm run aspire:lint", scripts["prebuild"]?.GetValue<string>()); 46Assert.Equal("npm run aspire:build", scripts["build"]?.GetValue<string>()); 47Assert.Equal("npm run aspire:dev", scripts["watch"]?.GetValue<string>()); 48Assert.Equal("^4.21.0", devDependencies["tsx"]?.GetValue<string>()); 49Assert.Equal("^5.9.3", devDependencies["typescript"]?.GetValue<string>()); 50Assert.Equal("^10.0.3", devDependencies["eslint"]?.GetValue<string>()); 51Assert.Equal("^8.57.1", devDependencies["typescript-eslint"]?.GetValue<string>()); 54Assert.Equal("^20.19.0 || ^22.13.0 || >=24", engines["node"]?.GetValue<string>()); 63Assert.Equal("./dist/apphost", tsConfig["compilerOptions"]?["outDir"]?.GetValue<string>()); 111Assert.Equal("aspire run", scripts["aspire:start"]?.GetValue<string>()); 112Assert.Equal("tsc -p tsconfig.apphost.json", scripts["aspire:build"]?.GetValue<string>()); 113Assert.Equal("tsc --watch -p tsconfig.apphost.json", scripts["aspire:dev"]?.GetValue<string>()); 114Assert.Equal("eslint apphost.mts", scripts["aspire:lint"]?.GetValue<string>()); 120Assert.Equal("^8.2.0", dependencies["vscode-jsonrpc"]?.GetValue<string>()); 121Assert.Equal("^4.21.0", devDependencies["tsx"]?.GetValue<string>()); 122Assert.Equal("^22.0.0", devDependencies["@types/node"]?.GetValue<string>()); 123Assert.Equal("^3.1.14", devDependencies["nodemon"]?.GetValue<string>()); 124Assert.Equal("^5.9.3", devDependencies["typescript"]?.GetValue<string>()); 129Assert.Equal("^20.19.0 || ^22.13.0 || >=24", engines["node"]?.GetValue<string>()); 147Assert.Equal("aspire-apphost", packageJson["name"]?.GetValue<string>()); 148Assert.Equal("1.0.0", packageJson["version"]?.GetValue<string>()); 149Assert.True(packageJson["private"]?.GetValue<bool>()); 150Assert.Equal("module", packageJson["type"]?.GetValue<string>()); 184Assert.Equal("^8.2.0", dependencies["vscode-jsonrpc"]?.GetValue<string>()); 185Assert.Equal("^22.0.0", devDependencies["@types/node"]?.GetValue<string>()); 186Assert.Equal("^3.1.14", devDependencies["nodemon"]?.GetValue<string>()); 187Assert.Equal("^4.21.0", devDependencies["tsx"]?.GetValue<string>()); 188Assert.Equal("^5.9.3", devDependencies["typescript"]?.GetValue<string>()); 236var applicationUrls = httpsProfile["applicationUrl"]!.GetValue<string>().Split(';', StringSplitOptions.RemoveEmptyEntries); 243var otlpHttpsPort = GetPort(environmentVariables["ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL"]!.GetValue<string>()); 244var resourceServiceHttpsPort = GetPort(environmentVariables["ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL"]!.GetValue<string>());
Aspire.Hosting.Foundry.Tests (4)
HostedAgentConfigurationTests.cs (3)
92Assert.Equal(ProjectsAgentProtocol.Responses.ToString(), protocolVersion!["protocol"]!.GetValue<string>()); 93Assert.Equal("2.0.0", protocolVersion["version"]!.GetValue<string>()); 94Assert.Equal("myregistry.azurecr.io/myagent:v1", definition["container_configuration"]!["image"]!.GetValue<string>());
HostedAgentExtensionTests.cs (1)
187Assert.Equal("hello from dashboard", JsonNode.Parse(fakeHandler.RequestContent!)?["message"]?.GetValue<string>());
Aspire.Hosting.Redis.Tests (30)
AddRedisTests.cs (26)
155Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 156var connectionString = manifest["connectionString"]!.GetValue<string>(); 161Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 162Assert.Equal("/bin/sh", manifest["entrypoint"]!.GetValue<string>()); 163Assert.Equal("{redis-password.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 164Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 165Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 180Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 181var connectionString = manifest["connectionString"]!.GetValue<string>(); 186Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 187Assert.Equal("/bin/sh", manifest["entrypoint"]!.GetValue<string>()); 188Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 189Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 209Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 210var connectionString = manifest["connectionString"]!.GetValue<string>(); 215Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 216Assert.Equal("{pass.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 217Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 218Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 235Assert.Equal("container.v0", manifest["type"]!.GetValue<string>()); 236var connectionString = manifest["connectionString"]!.GetValue<string>(); 241Assert.Equal($"{RedisContainerImageTags.Registry}/{RedisContainerImageTags.Image}:{RedisContainerImageTags.Tag}", manifest["image"]!.GetValue<string>()); 242Assert.Equal("{pass.value}", manifest["env"]!["REDIS_PASSWORD"]!.GetValue<string>()); 243Assert.Equal("redis", manifest["bindings"]!["tcp"]!["scheme"]!.GetValue<string>()); 244Assert.Equal(6379, manifest["bindings"]!["tcp"]!["targetPort"]!.GetValue<int>()); 1003Assert.Equal("value.v0", creEntry["type"]!.GetValue<string>());
RedisFunctionalTests.cs (4)
612Assert.False(agreements["analytics"]!.GetValue<bool>()); 613Assert.False(agreements["notifications"]!.GetValue<bool>()); 614Assert.False(agreements["encryption"]!.GetValue<bool>()); 615Assert.True(agreements["eula"]!.GetValue<bool>());
Aspire.Hosting.RemoteHost (8)
Ats\AtsMarshaller.cs (4)
898return value.GetValue<string>(); 903return value.GetValue<bool>(); 948return value.GetValue<double>(); 953return value.TryGetValue<float>(out var floatValue) ? floatValue : (float)value.GetValue<double>();
Ats\CapabilityDispatcher.cs (3)
1035return value.GetValue<string>() ?? 1046return value.GetValue<string>(); 1058return value.GetValue<int>();
Ats\HandleRegistry.cs (1)
200var handleId = handleNode?.GetValue<string>();
Aspire.Hosting.RemoteHost.Tests (117)
AtsMarshallerTests.cs (29)
137Assert.Equal("hello", result.GetValue<string>()); 148Assert.Equal(42, result.GetValue<int>()); 159Assert.True(result.GetValue<bool>()); 170Assert.Equal("ValueB", result.GetValue<string>()); 181Assert.Equal(1500.0, result.GetValue<double>()); 196Assert.Equal(1, jsonArray[0]!.GetValue<int>()); 197Assert.Equal(2, jsonArray[1]!.GetValue<int>()); 198Assert.Equal(3, jsonArray[2]!.GetValue<int>()); 211var tokenId = tokenValue.GetValue<string>(); 232var tokenId = tokenValue.GetValue<string>(); 461Assert.Equal("2024-06-15", result.GetValue<string>()); 484Assert.Contains("14:30:45", result.GetValue<string>()); 505Assert.Equal(9223372036854775807L, result.GetValue<long>()); 516Assert.Equal(3.14159, result.GetValue<double>()); 545var typeId = jsonObj["$type"]!.GetValue<string>(); 564var typeId = jsonObj["$type"]!.GetValue<string>(); 776Assert.Equal("test", jsonObj["name"]?.GetValue<string>()); 777Assert.Equal(10, jsonObj["count"]?.GetValue<int>()); 829Assert.Equal(1500, json["required"]?.GetValue<double>()); 830Assert.Equal(90_000, json["optional"]?.GetValue<double>()); 923Assert.Equal("root", obj["name"]!.GetValue<string>()); 939Assert.Equal("parent", obj["label"]!.GetValue<string>()); 941Assert.Equal("child", childObj["label"]!.GetValue<string>()); 959Assert.Equal("typed", obj["name"]!.GetValue<string>()); 975Assert.Equal("parent", obj["label"]!.GetValue<string>()); 977Assert.Equal("child", childObj["label"]!.GetValue<string>()); 1264var handleId = json["$handle"]!.GetValue<string>(); 1282var handleId = json!["$handle"]!.GetValue<string>(); 1301var handleId = json!["$handle"]!.GetValue<string>();
CallbackProxyTests.cs (10)
128Assert.Equal("hello-world", args["p0"]?.GetValue<string>()); 145Assert.Equal("test-name", args["p0"]?.GetValue<string>()); 146Assert.Equal(42, args["p1"]?.GetValue<int>()); 170Assert.NotNull(handle["$handle"]?.GetValue<string>()); 171Assert.Equal(AtsTypeMapping.DeriveTypeId(typeof(ITestCallbackHandle)), handle["$type"]?.GetValue<string>()); 201Assert.Equal("test", args["p0"]?.GetValue<string>()); 202var tokenId = args["p1"]?.GetValue<string>(); 205Assert.Equal(tokenId, args["$cancellationToken"]?.GetValue<string>()); 222var tokenId = args["p0"]?.GetValue<string>(); 224Assert.Equal(tokenId, args["$cancellationToken"]?.GetValue<string>());
CapabilityDispatcherTests.cs (76)
69receivedName = args?["name"]?.GetValue<string>(); 87Assert.Equal(42, result.GetValue<int>()); 189Assert.Equal("HELLO", result.GetValue<string>()); 201Assert.Equal("test:default", result.GetValue<string>()); 213Assert.Equal("test:custom", result.GetValue<string>()); 269Assert.Equal("test-name", nameResult.GetValue<string>()); 271Assert.Equal(100, countResult.GetValue<int>()); 330Assert.True(result.GetValue<bool>()); 390var nestedHandleId = handleRef["$handle"]!.GetValue<string>(); 391var nestedTypeId = handleRef["$type"]!.GetValue<string>(); 401Assert.Equal("Publish", operationResult.GetValue<string>()); 576Assert.Equal(12, result.GetValue<int>()); 596Assert.Equal("TEST", result.GetValue<string>()); 616Assert.Equal("VALUE-TASK", result.GetValue<string>()); 628Assert.Equal("VALUE-TASK", result.GetValue<string>()); 675Assert.Equal("PROCESSED: test-input", result.GetValue<string>()); 719Assert.Equal("hello from C#", callbackArgs["p0"]?.GetValue<string>()); 739Assert.Equal(42, result.GetValue<int>()); 751Assert.Equal(callerThreadId, result.GetValue<int>()); 763Assert.NotEqual(callerThreadId, result.GetValue<int>()); 775Assert.NotEqual(callerThreadId, result.GetValue<int>()); 800Assert.NotEqual(callerThreadId, result.GetValue<int>()); 917Assert.Equal("HELLO", result.GetValue<string>()); 946Assert.Equal(15, result.GetValue<int>()); 961Assert.Equal("item0", resultArray[0]?.GetValue<string>()); 962Assert.Equal("item1", resultArray[1]?.GetValue<string>()); 963Assert.Equal("item2", resultArray[2]?.GetValue<string>()); 978Assert.Equal(60, result.GetValue<int>()); 991Assert.Equal("hello", result.GetValue<string>()); 1003Assert.Equal("42", result.GetValue<string>()); 1021Assert.Equal("dto-value", result.GetValue<string>()); 1033Assert.Equal("enum:ValueB", result.GetValue<string>()); 1045Assert.Equal("string:/usr/local/lib/redis/modules/redisearch.so", result.GetValue<string>()); 1086Assert.Equal("union-resource", result.GetValue<string>()); 1152var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1165Assert.Equal("second", result.GetValue<string>()); 1175var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1187Assert.Equal(20, result.GetValue<int>()); 1198var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1210Assert.True(removeResult.GetValue<bool>()); 1220Assert.Equal(2, lengthResult.GetValue<int>()); 1231var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1242Assert.Equal(3, result.GetValue<int>()); 1253var listHandle = (listResult as JsonObject)?["$handle"]?.GetValue<string>(); 1271Assert.Equal(0, lengthResult.GetValue<int>()); 1298var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1311Assert.Equal("value1", result.GetValue<string>()); 1321var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1333Assert.Equal(10, result.GetValue<int>()); 1343var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1355Assert.Equal("one", result.GetValue<string>()); 1366var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1378Assert.True(removeResult.GetValue<bool>()); 1388Assert.Equal(1, countResult.GetValue<int>()); 1399var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1411Assert.True(hasResult.GetValue<bool>()); 1422Assert.False(hasResult2.GetValue<bool>()); 1433var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1447Assert.Contains("key1", keysArray.Select(k => k?.GetValue<string>())); 1448Assert.Contains("key2", keysArray.Select(k => k?.GetValue<string>())); 1458var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1471Assert.Contains(1, keysArray.Select(k => k?.GetValue<int>())); 1472Assert.Contains(2, keysArray.Select(k => k?.GetValue<int>())); 1482var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1502var dictHandle = (dictResult as JsonObject)?["$handle"]?.GetValue<string>(); 1513Assert.Equal(2, result.GetValue<int>()); 1530Assert.Equal("Received: ValueB", result.GetValue<string>()); 1547Assert.Equal("Received: ValueC", result.GetValue<string>()); 1564Assert.Equal("ValueA", result.GetValue<string>()); 1581Assert.Equal("Received: ValueB", result.GetValue<string>()); 1593Assert.Equal("No value", result.GetValue<string>()); 1682Assert.Equal("blue", result.GetValue<string>()); 1723Assert.Equal("hello, test-resource!", result.GetValue<string>()); 1740Assert.Equal("yellow", result.GetValue<string>()); 1757Assert.Equal("my-resource", result.GetValue<string>()); 2100Assert.Equal("Host", result.GetValue<string>());
HandleRegistryTests.cs (2)
176Assert.Equal("aspire/TestObject", json["$type"]!.GetValue<string>()); 178var handleId = json["$handle"]!.GetValue<string>();
Aspire.Hosting.Tests (88)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (13)
326Assert.Equal("normal-value", normalJsonValue.GetValue<string>()); 1278Assert.Equal("42", Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["number"]).GetValue<string>()); 1279Assert.Equal(bool.TrueString, Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["flag"]).GetValue<string>()); 1280Assert.Equal("one,two", Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["list"]).GetValue<string>()); 1325Assert.Equal(42, Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["number"]).GetValue<int>()); 1326Assert.True(Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["flag"]).GetValue<bool>()); 1330value => Assert.Equal("one", value?.GetValue<string>()), 1331value => Assert.Equal("two", value?.GetValue<string>())); 1333Assert.Equal("localhost", nameValueObject["Host"]?.GetValue<string>()); 1334Assert.Equal("catalogdb", nameValueObject["DatabaseName"]?.GetValue<string>()); 1370Assert.Equal("true", Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["terminal.enabled"]).GetValue<string>()); 1371Assert.Equal("0", Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["terminal.replicaIndex"]).GetValue<string>()); 1372Assert.Equal("1", Assert.IsAssignableFrom<JsonValue>(snapshot.Properties["terminal.replicaCount"]).GetValue<string>());
Orchestrator\ParameterProcessorTests.cs (8)
1153Assert.Equal("firstValue", savedValueNode?.GetValue<string>()); 1159Assert.Equal("secondValue", savedValueNode?.GetValue<string>()); 1186Assert.Equal("newValue", savedValueNode?.GetValue<string>()); 1427Assert.Equal("Server=localhost;Database=mydb", valueNode?.GetValue<string>()); 1468Assert.Equal("myvalue", valueNode?.GetValue<string>()); 1512Assert.Equal("customvalue", valueNode?.GetValue<string>()); 1551Assert.Equal("savedValue", savedValueNode?.GetValue<string>()); 1569Assert.Equal("savedValue", savedValueNode?.GetValue<string>());
Publishing\DeploymentStateManagerTests.cs (67)
51Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 120Assert.Equal("value1", parametersCheck.Data["param1"]?.GetValue<string>()); 121Assert.Equal("azure-value1", azureCheck.Data["resource1"]?.GetValue<string>()); 149Assert.Equal($"value{i}", section.Data[$"key{i}"]?.GetValue<string>()); 168Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 189Assert.Equal("value1", section2.Data["key1"]?.GetValue<string>()); 202Assert.Equal("value1", section3.Data["key1"]?.GetValue<string>()); 203Assert.Equal("value2", section3.Data["key2"]?.GetValue<string>()); 241Assert.Equal("value1", parametersSection.Data["param1"]?.GetValue<string>()); 242Assert.Equal("azure-value1", azureSection.Data["resource1"]?.GetValue<string>()); 243Assert.Equal("value1", restartedParametersSection.Data["param1"]?.GetValue<string>()); 260Assert.Equal("value1", retrievedSection.Data["key1"]?.GetValue<string>()); 277Assert.Equal("nestedValue", verifySection.Data["nestedKey"]?.GetValue<string>()); 297Assert.Equal("value1", verify1.Data["key1"]?.GetValue<string>()); 298Assert.Equal("value2", verify2.Data["key2"]?.GetValue<string>()); 314Assert.Equal("value1", verify.Data[""]?.GetValue<string>()); 374Assert.Equal("topValue", verifyTop.Data["topKey"]?.GetValue<string>()); 375Assert.Equal("nestedValue", verifyNested.Data["nestedKey"]?.GetValue<string>()); 481Assert.True(migratedSection.Data["legacy"]?.GetValue<bool>()); 493Assert.True(currentSection.Data["legacy"]?.GetValue<bool>()); 494Assert.True(currentSection.Data["current"]?.GetValue<bool>()); 536Assert.Equal("legacy", legacyAfterRestart.Data["Value"]?.GetValue<string>()); 537Assert.Equal("current", replacementAfterRestart.Data["Value"]?.GetValue<string>()); 559Assert.Equal("committed", restartedSection.Data["Value"]?.GetValue<string>()); 597Assert.Equal("legacy", parameterSection.Data[""]?.GetValue<string>()); 624Assert.Equal("existing", section.Data[""]?.GetValue<string>()); 630Assert.Equal("existing", restartedSection.Data[""]?.GetValue<string>()); 661Assert.Equal("updated", restartedSection.Data[""]?.GetValue<string>()); 693Assert.Equal("updated", restartedSection.Data["Leaf"]?.GetValue<string>()); 723Assert.True(features["A"]?.GetValue<bool>()); 724Assert.True(features["B"]?.GetValue<bool>()); 757Assert.Equal("first-sandbox", migratedFirstSection.Data["SandboxId"]?.GetValue<string>()); 758Assert.True(migratedFirstSection.Data["Migrated"]?.GetValue<bool>()); 770Assert.True(restartedFirstSection.Data["Migrated"]?.GetValue<bool>()); 771Assert.Equal("second-sandbox", restartedSecondSection.Data["SandboxId"]?.GetValue<string>()); 776Assert.Equal("second-sandbox", secondSection.Data["SandboxId"]?.GetValue<string>()); 786Assert.Equal("first-sandbox", clearedFirstLegacySection.Data["SandboxId"]?.GetValue<string>()); 787Assert.Equal("second-sandbox", preservedSecondLegacySection.Data["SandboxId"]?.GetValue<string>()); 811Assert.Equal("current-subscription", currentAzureSection.Data["SubscriptionId"]?.GetValue<string>()); 816Assert.Equal("current-subscription", restartedAzureSection.Data["SubscriptionId"]?.GetValue<string>()); 817Assert.Equal("first-sandbox", restartedAzureSection.Data["Sandboxes"]?["first"]?["SandboxId"]?.GetValue<string>()); 818Assert.Equal("second-sandbox", restartedAzureSection.Data["Sandboxes"]?["second"]?["SandboxId"]?.GetValue<string>()); 854restartedAzureSection.Data["Sandboxes"]?["new"]?["SandboxId"]?.GetValue<string>()); 899restartedSandboxesSection.Data["first"]?["new"]?["SandboxId"]?.GetValue<string>()); 902restartedSandboxesSection.Data["second"]?["SandboxId"]?.GetValue<string>()); 938Assert.Equal("first-sandbox", restartedFirstSection.Data["SandboxId"]?.GetValue<string>()); 939Assert.True(restartedFirstSection.Data["Updated"]?.GetValue<bool>()); 940Assert.Equal("second-sandbox", restartedSecondSection.Data["SandboxId"]?.GetValue<string>()); 941Assert.True(restartedSecondSection.Data["Updated"]?.GetValue<bool>()); 971Assert.Equal("current-subscription", restartedAzureSection.Data["SubscriptionId"]?.GetValue<string>()); 972Assert.Equal("current-location", restartedAzureSection.Data["Location"]?.GetValue<string>()); 975Assert.Equal("current-subscription", currentAzureSection.Data["SubscriptionId"]?.GetValue<string>()); 976Assert.Equal("current-location", currentAzureSection.Data["Location"]?.GetValue<string>()); 1006Assert.Equal("sub", preservedLegacySection.Data["SubscriptionId"]?.GetValue<string>()); 1036Assert.Equal("current-sub", asyncEffectiveState["Azure"]?["SubscriptionId"]?.GetValue<string>()); 1037Assert.Equal("current-sub", syncEffectiveState["Azure"]?["SubscriptionId"]?.GetValue<string>()); 1038Assert.Equal("current-sub", migratedSection.Data["SubscriptionId"]?.GetValue<string>()); 1060Assert.Equal("current-sub", asyncEffectiveState["Azure"]?["SubscriptionId"]?.GetValue<string>()); 1061Assert.Equal("current-sub", syncEffectiveState["Azure"]?["SubscriptionId"]?.GetValue<string>()); 1062Assert.Equal("current-sub", restartedSection.Data["SubscriptionId"]?.GetValue<string>()); 1068Assert.Equal("current-sub", savedSection.Data["SubscriptionId"]?.GetValue<string>()); 1069Assert.Equal("westus", savedSection.Data["Location"]?.GetValue<string>()); 1087Assert.Equal("sub", currentSection.Data["SubscriptionId"]?.GetValue<string>()); 1138.Data["SandboxId"]?.GetValue<string>()); 1142.Data["SubscriptionId"]?.GetValue<string>()); 1179.Data["SandboxId"]?.GetValue<string>()); 1183.Data["SandboxId"]?.GetValue<string>());
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
450if (propertyNodeType?.GetValueKind() == JsonValueKind.String && propertyNodeType.GetValue<string>() == "boolean")
dotnet (1)
Commands\New\MSBuildEvaluation\ProjectCapabilityConstraint.cs (1)
88string? configuredCapability = token.GetValue<string>();
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
85var toRemove = signingKeys.SingleOrDefault(key => key["Issuer"].GetValue<string>() == issuer);
Infrastructure.Tests (4)
Pipelines\NixCliPackageTests.cs (1)
265return Assert.IsAssignableFrom<JsonValue>(value).GetValue<string>();
Pipelines\NpmCliPackageTests.cs (3)
779return jsonObject[propertyName]?.GetValue<string>() 785return jsonNode?.AsArray().Select(value => value?.GetValue<string>() ?? throw new InvalidOperationException("JSON array contains a null value.")).ToArray() 793property => property.Value?.GetValue<string>() ?? throw new InvalidOperationException($"JSON property '{property.Key}' is not a string."),
Microsoft.AspNetCore.OpenApi (7)
Extensions\JsonNodeSchemaExtensions.cs (6)
383var defaultValue = defaultNode.GetValue<string>(); 388if (serialized?.GetValue<string>() == defaultValue) 510!string.IsNullOrEmpty(schemaIdNode.GetValue<string>())); 596if (typeArray[i]?.GetValue<string>() == "null") 603schema[OpenApiSchemaKeywords.TypeKeyword] = typeArray[0]?.GetValue<string>(); 612if (Enum.TryParse<JsonSchemaType>(jsonNode?.GetValue<string>(), true, out var openApiSchemaType))
Services\Schemas\OpenApiSchemaService.cs (1)
282if (rawEnum[i]?.GetValue<string>() != memberNames[i])
Microsoft.Extensions.AI.Abstractions (8)
Utilities\AIJsonUtilities.Schema.Create.cs (7)
295string refUri = paramName!.GetValue<string>(); 346string typeValue = typeKeyWord.GetValue<string>()!; 367string typeValue = typeKeyWord.GetValue<string>()!; 582if (entry?.GetValue<string>() == propertyName) 724schemaType = typeNode.GetValue<string>(); 736string entryValue = entry.GetValue<string>(); 789entry.GetValue<string>() is string type)
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
180string? description = schemaObj.TryGetPropertyValue(DescriptionPropertyName, out JsonNode? descriptionSchema) ? descriptionSchema?.GetValue<string>() : null;
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionCallContentTests.cs (1)
111Assert.Equal(informationalOnly, informationalOnlyValue!.GetValue<bool>());
Microsoft.Extensions.AI.OpenAI (1)
OpenAIClientExtensions.cs (1)
93$"{descriptionNode.GetValue<string>()}{Environment.NewLine}{additionalDescription}" :
Microsoft.ML.AutoML (9)
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
18var schema = jValue["schema"].GetValue<string>(); 19var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
SweepableEstimator\Converter\SweepableEstimatorConverter.cs (2)
19var estimatorType = jsonObject["estimatorType"].GetValue<EstimatorType>(); 20var parameter = jsonObject["parameter"].GetValue<Parameter>();
SweepableEstimator\Converter\SweepableEstimatorPipelineConverter.cs (2)
18var parameter = jNode["parameter"].GetValue<Parameter>(); 19var estimators = jNode["estimators"].GetValue<SweepableEstimator[]>();
SweepableEstimator\Converter\SweepablePipelineConverter.cs (3)
18var currentSchema = jValue["currentSchema"].GetValue<string>(); 19var schema = jValue["schema"].GetValue<string>(); 20var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
Microsoft.ML.AutoML.SourceGenerator (20)
SearchSpaceGenerator.cs (20)
39var className = Utils.ToTitleCase(jNode["name"].GetValue<string>()); 43var optionName = Utils.ToTitleCase(t["name"].GetValue<string>()); 44string optionTypeName = t["type"].GetValue<string>() switch 69(_, "string") => $"\"{defaultToken.GetValue<string>()}\"", 70(_, "int") => $"{defaultToken.GetValue<int>().ToString(CultureInfo.InvariantCulture)}", 71(_, "double") => $"{defaultToken.GetValue<double>().ToString(CultureInfo.InvariantCulture)}", 72(_, "float") => $"{defaultToken.GetValue<float>().ToString(CultureInfo.InvariantCulture)}F", 73(_, "bool") => defaultToken.GetValue<bool>() ? "true" : "false", 74(_, "Anchor") => defaultToken.GetValue<string>(), 75(_, "ResizingKind") => defaultToken.GetValue<string>(), 76(_, "ColorBits") => defaultToken.GetValue<string>(), 77(_, "ColorsOrder") => defaultToken.GetValue<string>(), 78(_, "BertArchitecture") => defaultToken.GetValue<string>(), 79(_, "Microsoft.ML.Vision.ImageClassificationTrainer.Architecture") => defaultToken.GetValue<string>(), 80(_, "Microsoft.ML.Data.DataKind") => defaultToken.GetValue<string>(), 81(_, "Microsoft.ML.IDataView") => defaultToken.GetValue<string>(), 82(_, "Microsoft.ML.Transforms.Text.TextNormalizingEstimator.CaseMode") => defaultToken.GetValue<string>(), 97var minValue = searchSpaceNode["min"].GetValue<double>(); 98var maxValue = searchSpaceNode["max"].GetValue<double>(); 99var logBase = searchSpaceObject.ContainsKey("log_base") is false ? "false" : searchSpaceNode["log_base"].GetValue<bool>() ? "true" : "false";
Microsoft.NET.Build.Containers (5)
ImageConfig.cs (5)
70internal string[]? GetEntrypoint() => _config["config"]?["Entrypoint"]?.AsArray()?.Select(node => node!.GetValue<string>())?.ToArray(); 71private string[]? GetCmd() => _config["config"]?["Entrypoint"]?.AsArray()?.Select(node => node!.GetValue<string>())?.ToArray(); 289string[] val = entry.GetValue<string>().Split('=', 2); 337if (rootfs["type"]?.GetValue<string>() == "layers" && rootfs["diff_ids"] is JsonArray layers) 339return layers.Select(l => l!.GetValue<string>()).ToList();
Microsoft.TemplateEngine.Cli (13)
Alias\AliasRegistry.cs (2)
203result[property.Key] = new List<string>() { property.Value.GetValue<string>() }; 212values.Add(item.GetValue<string>());
HostSpecificTemplateData.cs (3)
33.Select(v => v!.GetValue<string>())); 59JsonValueKind.String => symbolProperty.Value.GetValue<string>(), 80else if (kind == JsonValueKind.String && bool.TryParse(isHiddenNode.GetValue<string>(), out bool hidden))
JExtensions.cs (5)
30return val.GetValue<string>(); 47return element.GetValue<string>(); 91return bool.TryParse(token.GetValue<string>(), out result); 210values.Add(item.GetValue<string>()); 262return int.TryParse(token.GetValue<string>(), out result);
PostActionProcessors\ChmodPostActionProcessor.cs (1)
30values[i] = valueArray[i]?.GetValue<string>() ?? "";
PostActionProcessors\PostActionProcessorBase.cs (2)
134paths = config.GetValue<string>().Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 145.Select(token => token!.GetValue<string>()).ToList();
Microsoft.TemplateEngine.Edge (19)
BuiltInManagedProvider\GlobalSettings.cs (1)
91package![nameof(TemplatePackageData.LastChangeTime)]?.GetValue<DateTime>() ?? default,
Constraints\ConstraintsExtensions.cs (2)
24return new[] { token.GetValue<string>() ?? throw new ConfigurationException(string.Format(LocalizableStrings.Constraint_Error_ArgumentHasEmptyString, args)) }; 36string? strValue = value.GetValue<string>();
Settings\SettingsStore.cs (3)
29ComponentGuidToAssemblyQualifiedName[entry.Key] = entry.Value.GetValue<string>(); 43ProbingPaths.Add(path.GetValue<string>()); 64if (Guid.TryParse(value.GetValue<string>(), out Guid id))
Settings\TemplateCache.cs (2)
90? localeToken!.GetValue<string>() 101mountPointInfo.Add(entry.Key, entry.Value.GetValue<DateTime>());
Settings\TemplateInfoReader.cs (3)
38classifications.Add(item.GetValue<string>()); 99tags.Add(item.Key, item.Value?.GetValue<string>() ?? string.Empty); 111if (item != null && Guid.TryParse(item.GetValue<string>(), out Guid id))
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (10)
LocalizationModelDeserializer.cs (1)
32.Select(p => p.Value?.GetValueKind() == JsonValueKind.String ? (p.Key, p.Value.GetValue<string>()) : throw new Exception(LocalizableStrings.Authoring_InvalidJsonElementInLocalizationFile))
Macros\BaseMacroConfig.cs (1)
127return val.GetValueKind() == JsonValueKind.String ? val.GetValue<string>() : val.ToJsonString();
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
Microsoft.TemplateEngine.Utils (8)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
Microsoft.TemplateSearch.Common (8)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (8)
38return val.GetValue<string>(); 57return strVal.GetValue<string>(); 104return bool.TryParse(token.GetValue<string>(), out result); 139return int.TryParse(token.GetValue<string>(), out result); 305result[property.Key] = property.Value.GetValue<string>(); 382values.Add(item.GetValue<string>()); 407if (Guid.TryParse(item.GetValue<string>(), out Guid val)) 472string tokenValue = token.GetValue<string>();
sdk-tasks (1)
UpdateRuntimeConfig.cs (1)
58var name = framework["name"]!.GetValue<string>();
System.Text.Json (36)
System\Text\Json\Nodes\JsonArray.cs (2)
137/// Returns an enumerable that wraps calls to <see cref="JsonNode.GetValue{T}"/>. 145yield return item is null ? (T)(object?)null! : item.GetValue<T>();
System\Text\Json\Nodes\JsonNode.Operators.cs (33)
255public static explicit operator bool(JsonNode value) => value.GetValue<bool>(); 262public static explicit operator bool?(JsonNode? value) => value?.GetValue<bool>(); 269public static explicit operator byte(JsonNode value) => value.GetValue<byte>(); 276public static explicit operator byte?(JsonNode? value) => value?.GetValue<byte>(); 283public static explicit operator char(JsonNode value) => value.GetValue<char>(); 290public static explicit operator char?(JsonNode? value) => value?.GetValue<char>(); 297public static explicit operator DateTime(JsonNode value) => value.GetValue<DateTime>(); 304public static explicit operator DateTime?(JsonNode? value) => value?.GetValue<DateTime>(); 311public static explicit operator DateTimeOffset(JsonNode value) => value.GetValue<DateTimeOffset>(); 318public static explicit operator DateTimeOffset?(JsonNode? value) => value?.GetValue<DateTimeOffset>(); 325public static explicit operator decimal(JsonNode value) => value.GetValue<decimal>(); 332public static explicit operator decimal?(JsonNode? value) => value?.GetValue<decimal>(); 339public static explicit operator double(JsonNode value) => value.GetValue<double>(); 346public static explicit operator double?(JsonNode? value) => value?.GetValue<double>(); 353public static explicit operator Guid(JsonNode value) => value.GetValue<Guid>(); 360public static explicit operator Guid?(JsonNode? value) => value?.GetValue<Guid>(); 367public static explicit operator short(JsonNode value) => value.GetValue<short>(); 374public static explicit operator short?(JsonNode? value) => value?.GetValue<short>(); 381public static explicit operator int(JsonNode value) => value.GetValue<int>(); 388public static explicit operator int?(JsonNode? value) => value?.GetValue<int>(); 395public static explicit operator long(JsonNode value) => value.GetValue<long>(); 402public static explicit operator long?(JsonNode? value) => value?.GetValue<long>(); 410public static explicit operator sbyte(JsonNode value) => value.GetValue<sbyte>(); 418public static explicit operator sbyte?(JsonNode? value) => value?.GetValue<sbyte>(); 425public static explicit operator float(JsonNode value) => value.GetValue<float>(); 432public static explicit operator float?(JsonNode? value) => value?.GetValue<float>(); 439public static explicit operator string?(JsonNode? value) => value?.GetValue<string>(); 447public static explicit operator ushort(JsonNode value) => value.GetValue<ushort>(); 455public static explicit operator ushort?(JsonNode? value) => value?.GetValue<ushort>(); 463public static explicit operator uint(JsonNode value) => value.GetValue<uint>(); 471public static explicit operator uint?(JsonNode? value) => value?.GetValue<uint>(); 479public static explicit operator ulong(JsonNode value) => value.GetValue<ulong>(); 487public static explicit operator ulong?(JsonNode? value) => value?.GetValue<ulong>();
System\Text\Json\Nodes\JsonValue.cs (1)
32/// <seealso cref="JsonNode.GetValue{T}"></seealso>