66 instantiations of NativeServerOptions
Aspire.Hosting.Native.Core.Tests (59)
DcpJsonTests.cs (1)
37await using var client = handler.CreateClient(new());
DcpResponseTests.cs (6)
42await using var client = handler.CreateClient(new()); 55await using var client = handler.CreateClient(new()); 83await using var client = handler.CreateClient(new()); 92await using var client = handler.CreateClient(new()); 102await using var client = handler.CreateClient(new()); 115await using var client = handler.CreateClient(new());
DcpWorkloadCleanupTests.cs (10)
22await using var client = handler.CreateClient(new()); 38await using var client = handler.CreateClient(new()); 57var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 96await using var client = handler.CreateClient(new()); 116await using var client = handler.CreateClient(new()); 129var options = new NativeServerOptions { TimeProvider = clock, CleanupTimeout = TimeSpan.FromSeconds(2) }; 170var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 195var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 219var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 267var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) };
NativeAuxiliaryBackchannelTests.cs (3)
27var options = new NativeServerOptions { TimeProvider = clock, MaximumConnections = 2 }; 60var options = new NativeServerOptions(); 254await using var host = new NativeAuxiliaryTestHost(server, new NativeServerOptions { MaximumCliStreams = 1 });
NativeBuilderAuthoringTests.cs (2)
48await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 109await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new());
NativeCliProtocolTests.cs (8)
101var options = new NativeServerOptions { TimeProvider = clock, MaximumConnections = 2 }; 141var rpc = new NativeBackchannelRpc(new(), NullLogger.Instance); 160var options = new NativeServerOptions(); 173await using var host = NativeCliTestHost.Start(new NativeApplicationServer(), new(), () => urls); 189await using var host = NativeCliTestHost.Start(server, new(), () => new()); 213var options = new NativeServerOptions { RetainedAppHostLogEntries = 2 }; 240new NativeServerOptions { MaximumCliStreams = 1 }, () => new()); 253var options = new NativeServerOptions();
NativeComposeCSharpTests.cs (1)
385await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new());
NativeFramingTests.cs (1)
67using var peer = new NativeRpcPeer(stream, new NativeServerOptions(), NullLogger.Instance);
NativeIpcSecurityTests.cs (1)
48await using var cli = NativeCliTestHost.Start(new NativeApplicationServer(), new(), () => new());
NativePipelineTests.cs (2)
26await using var host = NativeCliTestHost.Start(server, new(), () => new()); 221await using var host = NativeCliTestHost.Start(server, new(), () => new());
NativeProviderClientTests.cs (3)
287await using var host = await NativeClientTestHost.StartWithOptionsAsync(new() { MaximumHandlesPerConnection = 4 }); 343await using var host = await NativeClientTestHost.StartWithOptionsAsync(new() { MaximumHandlesPerConnection = 16 }); 412await using var host = await NativeClientTestHost.StartWithOptionsAsync(new()
NativeProviderLifecycleTests.cs (12)
20var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 228await using var host = await NativeClientTestHost.StartWithOptionsAsync(new()); 260await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 312await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 356await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 393await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 427await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 452await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new NativeServerOptions 488await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 518await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 577await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 615await using var host = await NativeClientTestHost.StartWithOptionsAsync(new());
NativePublishingTests.cs (2)
65await using var host = NativeCliTestHost.Start(server, new(), () => new()); 99await using var host = NativeCliTestHost.Start(server, new(), () => new());
NativeRpcAuthoringTests.cs (2)
22await using var host = await NativeClientTestHost.StartWithExecutorAsync(executor, new()); 146await using var host = await NativeClientTestHost.StartWithOptionsAsync(new()
NativeSocketIsolationTests.cs (1)
27var options = new NativeServerOptions { TimeProvider = clock };
NativeTimeProviderTests.cs (2)
24var options = new NativeServerOptions { TimeProvider = clock }; 263var options = new NativeServerOptions
TestServices\NativeAuxiliaryTestHost.cs (1)
30public NativeAuxiliaryTestHost(NativeApplicationServer server) : this(server, new NativeServerOptions())
TestServices\NativeSocketTestHost.cs (1)
26: this((stream, token) => new NativeBackchannelRpc(new NativeServerOptions(), NullLogger.Instance)
Aspire.Hosting.Native.Server (7)
Dashboard\NativeDashboardHost.cs (1)
36=> StartAsync(server, applicationName, apiKey, port, new(), cancellationToken);
Dcp\DcpApiClient.cs (1)
34public DcpApiClient() : this(new())
Dcp\DcpWorkloadExecutor.cs (2)
22public DcpWorkloadExecutor(DcpApiClient client) : this(client, Task.CompletedTask, new()) 26public DcpWorkloadExecutor(DcpApiClient client, Task startup) : this(client, startup, new())
NativeServerOptions.cs (1)
39options = new();
Rpc\NativeRpcConnection.cs (1)
237: this(token, server, ownsServer, languages, new())
Rpc\NativeRpcListener.cs (1)
47: this(endPoint, token, logger, server, languages, new())
70 references to NativeServerOptions
Aspire.Hosting.Native.Core.Tests (31)
DcpWorkloadCleanupTests.cs (6)
57var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 129var options = new NativeServerOptions { TimeProvider = clock, CleanupTimeout = TimeSpan.FromSeconds(2) }; 170var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 195var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 219var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) }; 267var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) };
NativeAuxiliaryBackchannelTests.cs (2)
27var options = new NativeServerOptions { TimeProvider = clock, MaximumConnections = 2 }; 60var options = new NativeServerOptions();
NativeCliProtocolTests.cs (4)
101var options = new NativeServerOptions { TimeProvider = clock, MaximumConnections = 2 }; 160var options = new NativeServerOptions(); 213var options = new NativeServerOptions { RetainedAppHostLogEntries = 2 }; 253var options = new NativeServerOptions();
NativeProtocolParsingTests.cs (2)
278var padded = valid.Replace("\"data\":\"\"", $"\"data\":\"{new string('x', Aspire.Hosting.Native.Server.NativeServerOptions.DefaultMaximumRequestBytes - Encoding.UTF8.GetByteCount(valid))}\""); 279Assert.Equal(Aspire.Hosting.Native.Server.NativeServerOptions.DefaultMaximumRequestBytes, Encoding.UTF8.GetByteCount(padded));
NativeProviderLifecycleTests.cs (1)
20var options = new NativeServerOptions { CleanupTimeout = TimeSpan.FromSeconds(10) };
NativeRpcTests.cs (1)
201Assert.Equal("REQUEST_TOO_LARGE", Error(JsonNode.Parse(connection.Process(new byte[Aspire.Hosting.Native.Server.NativeServerOptions.DefaultMaximumRequestBytes + 1])!)!.AsObject()));
NativeServerOptionsTests.cs (2)
14var options = JsonSerializer.Deserialize(""" 41var options = JsonSerializer.Deserialize(json, NativeServerJsonContext.Default.NativeServerOptions)!;
NativeSocketIsolationTests.cs (1)
27var options = new NativeServerOptions { TimeProvider = clock };
NativeTimeProviderTests.cs (2)
24var options = new NativeServerOptions { TimeProvider = clock }; 263var options = new NativeServerOptions
TestServices\DcpCleanupTestHandler.cs (1)
24public DcpApiClient CreateClient(NativeServerOptions options)
TestServices\NativeAuxiliaryTestHost.cs (2)
34public NativeAuxiliaryTestHost(NativeApplicationServer server, NativeServerOptions options) 39public NativeAuxiliaryTestHost(NativeApplicationServer server, NativeServerOptions options, INativeBackchannelRpc rpc)
TestServices\NativeClientTestHost.cs (3)
34public static Task<NativeClientTestHost> StartWithOptionsAsync(Aspire.Hosting.Native.Server.NativeServerOptions options) => 37Aspire.Hosting.Native.Server.NativeServerOptions options) => 42Aspire.Hosting.Native.Server.NativeServerOptions? options = null, IWorkloadExecutor? executor = null)
TestServices\NativeCliTestHost.cs (3)
28private NativeCliTestHost(NativeApplicationServer server, NativeServerOptions options, 47public static NativeCliTestHost Start(NativeApplicationServer server, NativeServerOptions options, 51public static NativeCliTestHost Start(NativeApplicationServer server, NativeServerOptions options,
TestServices\RpcTestClient.cs (1)
26public RpcTestClient(NativeApplicationServer server, NativeServerOptions options)
Aspire.Hosting.Native.Server (39)
Auxiliary\NativeAuxiliaryBackchannel.cs (2)
25private readonly NativeServerOptions _options; 48NativeServerOptions options, Action<int?> stop, Func<CancellationToken, Task> ready,
Cli\NativeCliProtocol.cs (2)
25private readonly NativeServerOptions _options; 31Func<CancellationToken, Task<NativeCliDashboardUrls>> dashboard, NativeCliLogBuffer logs, NativeServerOptions options,
Dashboard\DcpDashboard.cs (1)
25NativeDashboardCredentials credentials, NativeServerOptions options, CancellationToken cancellationToken)
Dashboard\NativeDashboardHost.cs (3)
22private readonly NativeServerOptions _options; 26private NativeDashboardHost(WebApplication application, Uri address, NativeServerOptions options, CancellationTokenSource requests) 39string apiKey, int port, NativeServerOptions options, CancellationToken cancellationToken)
Dcp\DcpApiClient.cs (4)
29private readonly NativeServerOptions _options; 38public DcpApiClient(NativeServerOptions options) : this(options, NullLogger.Instance) 42public DcpApiClient(NativeServerOptions options, ILogger logger) 49internal DcpApiClient(NativeServerOptions options, HttpClient client) : this(options)
Dcp\DcpWorkloadExecutor.cs (3)
14internal sealed class DcpWorkloadExecutor(DcpApiClient client, Task startup, NativeServerOptions options, ILogger logger) : 17public DcpWorkloadExecutor(DcpApiClient client, Task startup, NativeServerOptions options) 244NativeServerOptions options, ILogger logger) : IWorkloadPreparation
NativeDiagnosticPump.cs (2)
13private readonly NativeServerOptions _options; 15public NativeDiagnosticPump(Action<OperationEvent> consume, Action<Exception> error, NativeServerOptions options)
NativeServerConfiguration.cs (3)
16NativeServerOptions Options, 36var options = NativeServerOptions.Load(configuration["ASPIRE_NATIVE_SERVER_OPTIONS_PATH"]);
NativeServerHostedService.cs (1)
84var options = settings.Options;
NativeServerOptions.cs (3)
34public static NativeServerOptions Load(string? path) 36NativeServerOptions options; 77[JsonSerializable(typeof(NativeServerOptions))]
Rpc\NativeBackchannelRpc.cs (2)
15internal sealed class NativeBackchannelRpc(NativeServerOptions options, ILogger logger, INativeRpcPeerFactory peers) : INativeBackchannelRpc 17public NativeBackchannelRpc(NativeServerOptions options, ILogger logger)
Rpc\NativeProviderRegistry.cs (1)
28internal sealed partial class NativeProviderRegistry(JsonObject coreContract, NativeServerOptions options, ILogger logger) : INativeProviderRegistry
Rpc\NativeRpcConnection.cs (5)
25private readonly NativeServerOptions _options; 241public NativeRpcConnection(string token, NativeApplicationServer server, NativeLanguageCatalog? languages, NativeServerOptions options) 246public NativeRpcConnection(string token, NativeApplicationServer server, NativeLanguageCatalog? languages, NativeServerOptions options, 253NativeServerOptions options) : this(token, server, ownsServer, languages, options, NullLogger.Instance) 258NativeServerOptions options, ILogger logger)
Rpc\NativeRpcFraming.cs (1)
13public NativeRpcFraming(Stream stream) : this(stream, NativeServerOptions.DefaultMaximumRequestBytes)
Rpc\NativeRpcListener.cs (3)
26private readonly NativeServerOptions _options; 52NativeLanguageCatalog? languages, NativeServerOptions options) 59NativeLanguageCatalog? languages, NativeServerOptions options, INativeRpcPeerFactory peers, INativeProviderRegistry providers)
Rpc\NativeRpcPeer.cs (2)
13internal sealed class NativeRpcPeerFactory(NativeServerOptions options, ILogger logger) : INativeRpcPeerFactory 19internal sealed class NativeRpcPeer(Stream stream, NativeServerOptions options, ILogger logger) : INativeRpcPeer
Rpc\NativeRpcProtocol.cs (1)
54if (payload.Length > NativeServerOptions.DefaultMaximumRequestBytes)