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