4 instantiations of JsonDocument
System.Text.Json (4)
1659 references to JsonDocument
AnalyzeCiFailure (6)
AnalyzeCiFailure.Tests (104)
aspire (87)
DotNet\DotNetCliRunner.cs (4)
35Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken);
773public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken)
901var json = JsonDocument.Parse(stdout);
Projects\ProjectUpdater.cs (8)
623private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, CancellationToken cancellationToken)
628private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, CancellationToken cancellationToken)
654private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken)
659private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, string[] items, string[] properties, UpdateContext context, CancellationToken cancellationToken)
740using var sourceDocument = fallbackParser.ParseProject(context.AppHostProjectFile);
751var itemsAndPropertiesDocument = await GetItemsAndPropertiesWithFallbackAsync(context.AppHostProjectFile, context, cancellationToken);
1443var itemsAndPropertiesDocument = IsAppHostProject(projectFile, context.AppHostProjectFile)
1732var document = await GetItemsAndPropertiesAsync(
aspire-managed (2)
aspire-tray (4)
Aspire.Acquisition.Tests (10)
Aspire.Azure.AI.Extensions.OpenAI.Tests (4)
Aspire.Azure.AI.Projects.Tests (2)
Aspire.Cli.EndToEnd.Tests (66)
Aspire.Cli.Tests (441)
Commands\DoctorCommandTests.cs (27)
50using var doc = await RunDoctorJsonAsync(context.Workspace,
117using var doc = await RunDoctorJsonAsync(workspace,
141using var doc = await RunDoctorJsonAsync(workspace,
168using var doc = await RunDoctorJsonAsync(workspace,
231using var doc = JsonDocument.Parse(stdoutText);
245using var doc = await RunDoctorJsonAsync(workspace,
282using var doc = await RunDoctorJsonAsync(workspace,
322using var doc = await RunDoctorJsonAsync(workspace,
349using var doc = await RunDoctorJsonAsync(workspace,
379using var doc = await RunDoctorJsonAsync(workspace,
403using var doc = await RunDoctorJsonAsync(workspace,
429using var doc = await RunDoctorJsonAsync(workspace,
458using var doc = await RunDoctorJsonAsync(workspace,
492using var doc = await RunDoctorJsonAsync(workspace,
521using var doc = await RunDoctorJsonAsync(workspace,
545using var doc = await RunDoctorJsonAsync(workspace,
581using var doc = await RunDoctorJsonAsync(workspace,
615using var doc = await RunDoctorJsonAsync(workspace,
640using var doc = await RunDoctorJsonAsync(workspace,
664using var doc = await RunDoctorJsonAsync(workspace,
705using var doc = await RunDoctorJsonAsync(workspace,
949using var doc = await RunDoctorJsonAsync(workspace,
983using var doc = await RunDoctorJsonAsync(workspace,
1083private async Task<JsonDocument> RunDoctorJsonAsync(
1104return JsonDocument.Parse(stdoutText);
1107private static JsonElement GetCheckByName(JsonDocument document, string checkName)
Projects\DotNetAppHostProjectTests.cs (17)
505return (0, JsonDocument.Parse($$"""
891return (0, JsonDocument.Parse($$"""
951return (0, JsonDocument.Parse($$"""
1017return (0, JsonDocument.Parse($$"""
1112return (0, JsonDocument.Parse($$"""
1669return (0, JsonDocument.Parse($$"""
1825return (0, JsonDocument.Parse($$"""
1935return (0, JsonDocument.Parse($$"""
1998return (0, JsonDocument.Parse($$"""
2061return (0, JsonDocument.Parse($$"""
2122return (0, JsonDocument.Parse($$"""
2182return (0, JsonDocument.Parse($$"""
2248return (0, JsonDocument.Parse($$"""
2316return (0, JsonDocument.Parse($$"""
3080Func<JsonDocument> createAppHostInfo,
4770private static JsonDocument CreateAppHostInfoJson(
4790return JsonDocument.Parse(JsonSerializer.Serialize(new { Properties = properties, Items = new { } }));
Projects\ProjectUpdaterNuGetConfigurationTests.cs (18)
82using var output = TestDotNetCliRunner.CreateRestoreSettingsOutput(file, properties);
85return (0, JsonDocument.Parse(json.ToJsonString()));
263using var parsed = provider.GetRequiredService<FallbackProjectParser>().ParseProject(projectFile);
324return (0, JsonDocument.Parse(output.ToJsonString()));
422using var parsed = new FallbackProjectParser(NullLogger<FallbackProjectParser>.Instance).ParseProject(file);
440using var settings = TestDotNetCliRunner.CreateRestoreSettingsOutput(file, properties);
446return (0, JsonDocument.Parse(json.ToJsonString()));
541return Task.FromCanceled<(int, JsonDocument?)>(token);
657using var parsed = provider.GetRequiredService<FallbackProjectParser>().ParseProject(projectFile);
659using var parsedWeb = provider.GetRequiredService<FallbackProjectParser>().ParseProject(webProject);
827using var output = TestDotNetCliRunner.CreateRestoreSettingsOutput(file, properties);
830return (0, JsonDocument.Parse(json.ToJsonString()));
1420using var parsed = new FallbackProjectParser(NullLogger<FallbackProjectParser>.Instance).ParseProject(file);
1717return (0, JsonDocument.Parse(childEvaluation.ToJsonString()));
1726return (0, JsonDocument.Parse(evaluation.ToJsonString()));
2049private static (int, JsonDocument) CreatePackageEvaluation()
2054return (0, JsonDocument.Parse(properties.ToJsonString()));
2078using var project = provider.GetRequiredService<FallbackProjectParser>().ParseProject(projectFile);
TestServices\TestDotNetCliRunner.cs (12)
25public Func<FileInfo, string[], string[], string[], ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, JsonDocument? Output)>>? GetProjectItemsAndPropertiesAsyncCallbackWithTargetsAsync { get; set; }
26public Func<FileInfo, string[], string[], string[], ProcessInvocationOptions, CancellationToken, (int ExitCode, JsonDocument? Output)>? GetProjectItemsAndPropertiesAsyncCallbackWithTargets { get; set; }
27public Func<FileInfo, string[], string[], ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, JsonDocument? Output)>>? GetProjectItemsAndPropertiesAsyncCallbackAsync { get; set; }
28public Func<FileInfo, string[], string[], ProcessInvocationOptions, CancellationToken, (int ExitCode, JsonDocument? Output)>? GetProjectItemsAndPropertiesAsyncCallback { get; set; }
108public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken)
123return Task.FromResult<(int, JsonDocument?)>((0, CreateRestoreSettingsOutput(projectFile, properties)));
153return Task.FromResult<(int, JsonDocument?)>((exitCode, JsonDocument.Parse(json)));
168return Task.FromResult<(int, JsonDocument?)>((0, JsonDocument.Parse(defaultJson)));
171internal static JsonDocument CreateRestoreSettingsOutput(FileInfo projectFile, string[] properties)
180return JsonDocument.Parse(new JsonObject { ["Properties"] = values }.ToJsonString());
Aspire.Components.Common.TestUtilities (4)
Aspire.Dashboard (10)
Aspire.Dashboard.Playwright.Tests (10)
Aspire.Dashboard.Tests (23)
Aspire.Deployment.EndToEnd.Tests (33)
Helpers\EntraDeploymentHelpers.cs (7)
115using (var existingGroup = await ReadResourceAsync(client, credential, deployment.ResourceGroupUrl, cancellationToken))
122using var existingApplication = await ReadResourceAsync(client, credential, applicationUrl, cancellationToken);
234using var resource = await ReadResourceAsync(client, credential, url, readiness.Token);
270using var application = await ReadResourceAsync(client, credential, applicationUrl, cleanup.Token);
338using var resource = await ReadResourceAsync(client, credential, url, cancellationToken);
357internal static async Task<JsonDocument?> ReadResourceAsync(
368return await JsonDocument.ParseAsync(stream, cancellationToken: cancellationToken);
Aspire.Hosting (18)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Azure.Tests (14)
Aspire.Hosting.Blazor (2)
Aspire.Hosting.Blazor.Tests (4)
Aspire.Hosting.Browsers (4)
Aspire.Hosting.Browsers.Tests (15)
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.TypeScript (4)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (8)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Dotnet (2)
Aspire.Hosting.Dotnet.Tests (2)
Aspire.Hosting.EntityFrameworkCore (2)
Aspire.Hosting.Foundry (10)
Aspire.Hosting.Foundry.Tests (6)
Aspire.Hosting.Go (2)
Aspire.Hosting.Go.Tests (4)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (2)
Aspire.Hosting.JavaScript.Tests (2)
Aspire.Hosting.Kubernetes (12)
Aspire.Hosting.Kubernetes.Tests (2)
Aspire.Hosting.Maui (2)
Aspire.Hosting.Native.CodeGeneration (2)
Aspire.Hosting.Native.Core.Tests (38)
Aspire.Hosting.Native.Server (14)
Aspire.Hosting.OpenAI (2)
Aspire.Hosting.PostgreSQL.Tests (2)
Aspire.Hosting.Radius (10)
Aspire.Hosting.Radius.Tests (4)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.RemoteHost.Tests (4)
Aspire.Hosting.Rust (2)
Aspire.Hosting.Sdk.Tests (8)
Aspire.Hosting.Seq.Tests (2)
Aspire.Hosting.Tests (51)
Aspire.Hosting.TestUtilities (8)
Aspire.Templates.Tests (2)
Aspire.TerminalHost.Tests (4)
Aspire.TestTools (11)
Aspire.Tray.Tests (10)
Aspire.TypeSystem (1)
dotnet-aot (7)
dotnet-openapi (2)
dotnet-sourcelink (1)
dotnet-user-jwts (2)
GenerateTemplateManifest (6)
ILCompiler.Compiler (2)
ILCompiler.ReadyToRun (2)
Infrastructure.Tests (76)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.Facebook (2)
Microsoft.AspNetCore.Authentication.Google (2)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (2)
Microsoft.AspNetCore.Authentication.OAuth (8)
Microsoft.AspNetCore.Authentication.OpenIdConnect (8)
Microsoft.AspNetCore.Authentication.Twitter (5)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.Build (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.Deployment.DotNet.Releases (4)
Microsoft.DotNet.Arcade.Sdk (4)
Microsoft.DotNet.Cli.InternalMicrosoft (13)
Microsoft.DotNet.HotReload.Watch (4)
Microsoft.DotNet.ProjectTools (2)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (8)
Functions\AIFunctionFactory.cs (7)
96/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>,
177/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>,
267/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>,
356/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>,
419/// <see cref="JsonDocument"/>, or <see cref="JsonNode"/>, it is deserialized directly. If the argument is anything else unknown,
459/// invocation directly if the object is already of a compatible type. Otherwise, if the argument is a <see cref="JsonElement"/>, <see cref="JsonDocument"/>,
974JsonDocument doc => JsonSerializer.Deserialize(doc, typeInfo),
Microsoft.Extensions.AI.Abstractions.Tests (37)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
Microsoft.Extensions.AI.Evaluation.Safety (10)
Microsoft.Extensions.AI.OpenAI (4)
Microsoft.Extensions.AI.OpenAI.Tests (15)
Microsoft.Extensions.AI.Tests (15)
Microsoft.Extensions.Configuration.Json (2)
Microsoft.Extensions.Documents.Abstractions.Tests (4)
Microsoft.ML.Tokenizers (2)
Microsoft.ML.Tokenizers.Tests (4)
Microsoft.NET.Build.Containers (6)
Microsoft.NET.Build.Tasks (4)
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (4)
Microsoft.NET.ProjectData.Generators (2)
Microsoft.NET.ProjectData.Tasks (6)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (4)
Microsoft.SourceLink.Tools.Package (1)
Microsoft.TemplateEngine.Edge (9)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (8)
Microsoft.TemplateEngine.Utils (8)
Microsoft.TemplateSearch.Common (8)
Microsoft.TestPlatform.CommunicationUtilities (41)
Microsoft.TestPlatform.TestHostRuntimeProvider (2)
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
NativeIntegrations.Contracts (1)
artifacts\obj\NativeIntegrations.Contracts\Debug\provider-contract\ProviderContract.g.cs (1)
10public static NativeProviderDefinition Create() => new(JsonDocument.Parse("{\u0022protocolVersion\u0022:2,\u0022capabilities\u0022:[{\u0022id\u0022:\u0022example.csharp.external-api/addExternalApi\u0022,\u0022method\u0022:\u0022addExternalApi\u0022,\u0022description\u0022:\u0022Integration-owned AddExternalApi.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022composition\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.Composition\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022name\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022}},{\u0022name\u0022:\u0022baseUrl\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:null,\u0022targetParameterName\u0022:null},{\u0022id\u0022:\u0022example.csharp.external-api/withApiKey\u0022,\u0022method\u0022:\u0022withApiKey\u0022,\u0022description\u0022:\u0022Integration-owned WithApiKey.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022apiKey\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022},{\u0022id\u0022:\u0022example.csharp.external-api/getResourceName\u0022,\u0022method\u0022:\u0022getResourceName\u0022,\u0022description\u0022:\u0022Integration-owned GetResourceName.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.external-api/NativeIntegrations.ExternalApi.ExternalApiResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022}]}").RootElement.Clone(), DispatchAsync);
NativeIntegrations.Redis.Contracts (1)
artifacts\obj\NativeIntegrations.Redis.Contracts\Debug\provider-contract\ProviderContract.g.cs (1)
10public static NativeProviderDefinition Create() => new(JsonDocument.Parse("{\u0022protocolVersion\u0022:2,\u0022capabilities\u0022:[{\u0022id\u0022:\u0022example.csharp.redis/addRedis\u0022,\u0022method\u0022:\u0022addRedis\u0022,\u0022description\u0022:\u0022Integration-owned AddRedis.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022composition\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.Composition\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022name\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022}},{\u0022name\u0022:\u0022password\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:null,\u0022targetParameterName\u0022:null},{\u0022id\u0022:\u0022example.csharp.redis/redisDeclaration\u0022,\u0022method\u0022:\u0022redisDeclaration\u0022,\u0022description\u0022:\u0022Integration-owned GetDeclaration.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022},{\u0022id\u0022:\u0022example.csharp.redis/redisConnection\u0022,\u0022method\u0022:\u0022redisConnection\u0022,\u0022description\u0022:\u0022Integration-owned GetConnection.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredValue\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022},{\u0022id\u0022:\u0022example.csharp.redis/redisInitialize\u0022,\u0022method\u0022:\u0022redisInitialize\u0022,\u0022description\u0022:\u0022Integration-owned Initialize.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022scope\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceLifecycleScope\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022void\u0022,\u0022category\u0022:\u0022Primitive\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022,\u0022lifecyclePhase\u0022:\u0022initialize\u0022},{\u0022id\u0022:\u0022example.csharp.redis/redisAllocated\u0022,\u0022method\u0022:\u0022redisAllocated\u0022,\u0022description\u0022:\u0022Integration-owned Allocated.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022scope\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceLifecycleScope\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022void\u0022,\u0022category\u0022:\u0022Primitive\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022,\u0022lifecyclePhase\u0022:\u0022allocated\u0022},{\u0022id\u0022:\u0022example.csharp.redis/redisReady\u0022,\u0022method\u0022:\u0022redisReady\u0022,\u0022description\u0022:\u0022Integration-owned Ready.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022scope\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceLifecycleScope\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022void\u0022,\u0022category\u0022:\u0022Primitive\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022,\u0022lifecyclePhase\u0022:\u0022ready\u0022},{\u0022id\u0022:\u0022example.csharp.redis/redisRetiring\u0022,\u0022method\u0022:\u0022redisRetiring\u0022,\u0022description\u0022:\u0022Integration-owned Retiring.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022scope\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.ResourceLifecycleScope\u0022,\u0022category\u0022:\u0022Handle\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022void\u0022,\u0022category\u0022:\u0022Primitive\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022,\u0022lifecyclePhase\u0022:\u0022retiring\u0022},{\u0022id\u0022:\u0022example.csharp.redis/withDataVolume\u0022,\u0022method\u0022:\u0022withDataVolume\u0022,\u0022description\u0022:\u0022Integration-owned WithDataVolume.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022name\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022},{\u0022id\u0022:\u0022example.csharp.redis/withReference\u0022,\u0022method\u0022:\u0022withReference\u0022,\u0022description\u0022:\u0022Integration-owned WithReference.\u0022,\u0022parameters\u0022:[{\u0022name\u0022:\u0022context\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022consumer\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredResource\u0022,\u0022category\u0022:\u0022Handle\u0022}},{\u0022name\u0022:\u0022environmentName\u0022,\u0022type\u0022:{\u0022typeId\u0022:\u0022string\u0022,\u0022category\u0022:\u0022Primitive\u0022}}],\u0022returnType\u0022:{\u0022typeId\u0022:\u0022Aspire.Hosting.Native.Server/Aspire.Hosting.Native.Api.DeclaredResource\u0022,\u0022category\u0022:\u0022Handle\u0022},\u0022targetTypeId\u0022:\u0022example.csharp.redis/NativeIntegrations.Redis.RedisResource\u0022,\u0022targetParameterName\u0022:\u0022context\u0022}]}").RootElement.Clone(), DispatchAsync);
NuGet.Protocol (6)
RepoTasks (2)
rzc (2)
Shared.Tests (5)
System.Text.Json (155)
System\Text\Json\Document\JsonDocument.Parse.cs (27)
16private static JsonDocument? s_nullLiteral;
17private static JsonDocument? s_trueLiteral;
18private static JsonDocument? s_falseLiteral;
47public static JsonDocument Parse(ReadOnlyMemory<byte> utf8Json, JsonDocumentOptions options = default)
77public static JsonDocument Parse(ReadOnlySequence<byte> utf8Json, JsonDocumentOptions options = default)
122public static JsonDocument Parse(Stream utf8Json, JsonDocumentOptions options = default)
145internal static JsonDocument ParseRented(PooledByteBufferWriter utf8Json, JsonDocumentOptions options = default)
155internal static JsonDocument ParseValue(Stream utf8Json, JsonDocumentOptions options)
175internal static JsonDocument ParseValue(ReadOnlySpan<byte> utf8Json, JsonDocumentOptions options)
186internal static JsonDocument ParseValue(string json, JsonDocumentOptions options)
208public static Task<JsonDocument> ParseAsync(
218private static async Task<JsonDocument> ParseAsyncCore(
242internal static async Task<JsonDocument> ParseAsyncCoreUnrented(
282public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] ReadOnlyMemory<char> json, JsonDocumentOptions options = default)
308internal static JsonDocument ParseValue(ReadOnlySpan<char> json, JsonDocumentOptions options)
349public static JsonDocument Parse([StringSyntax(StringSyntaxAttribute.Json)] string json, JsonDocumentOptions options = default)
394public static bool TryParseValue(ref Utf8JsonReader reader, [NotNullWhen(true)] out JsonDocument? document)
434public static JsonDocument ParseValue(ref Utf8JsonReader reader) =>
437internal static JsonDocument ParseValue(ref Utf8JsonReader reader, bool allowDuplicateProperties)
439bool ret = TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: true, allowDuplicateProperties);
448[NotNullWhen(true)] out JsonDocument? document,
692private static JsonDocument CreateForLiteral(JsonTokenType tokenType)
708JsonDocument Create(byte[] utf8Json)
716private static JsonDocument Parse(
726JsonDocument document;
753private static JsonDocument ParseUnrented(
787JsonDocument document = new JsonDocument(utf8Json, database, isDisposable: false);
System\Text\Json\Document\JsonElement.Parse.cs (14)
49bool ret = JsonDocument.TryParseValue(ref reader, out JsonDocument? document, shouldThrow: true, useArrayPools: false);
58bool ret = JsonDocument.TryParseValue(
60out JsonDocument? document,
72JsonDocument document = JsonDocument.ParseValue(utf8Json, options);
86JsonDocument document = JsonDocument.ParseValue(utf8Json, options);
100JsonDocument document = JsonDocument.ParseValue(json, options);
117JsonDocument document = JsonDocument.ParseValue(json, options);
161bool ret = JsonDocument.TryParseValue(ref reader, out JsonDocument? document, shouldThrow: false, useArrayPools: false);
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (19)
14/// Converts the provided value into a <see cref="JsonDocument"/>.
17/// <returns>A <see cref="JsonDocument"/> representation of the JSON value.</returns>
26public static JsonDocument SerializeToDocument<TValue>(TValue value, JsonSerializerOptions? options = null)
33/// Converts the provided value into a <see cref="JsonDocument"/>.
35/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns>
51public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerOptions? options = null)
59/// Converts the provided value into a <see cref="JsonDocument"/>.
62/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns>
68public static JsonDocument SerializeToDocument<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)
77/// Converts the provided value into a <see cref="JsonDocument"/>.
79/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns>
88public static JsonDocument SerializeToDocument(object? value, JsonTypeInfo jsonTypeInfo)
97/// Converts the provided value into a <see cref="JsonDocument"/>.
99/// <returns>A <see cref="JsonDocument"/> representation of the value.</returns>
114public static JsonDocument SerializeToDocument(object? value, Type inputType, JsonSerializerContext context)
122private static JsonDocument WriteDocument<TValue>(in TValue value, JsonTypeInfo<TValue> jsonTypeInfo)
135return JsonDocument.ParseRented(output, options.GetDocumentOptions());
143private static JsonDocument WriteDocumentAsObject(object? value, JsonTypeInfo jsonTypeInfo)
156return JsonDocument.ParseRented(output, options.GetDocumentOptions());