3 instantiations of NatsServerResource
Aspire.Hosting.Nats.Tests (3)
NatsPublicApiTests.cs (3)
92
var action = () => new
NatsServerResource
(name);
106
var action = () => new
NatsServerResource
(name, user.Resource, password.Resource);
115
new
NatsServerResource
("nats", userName: null, password: null);
24 references to NatsServerResource
Aspire.Hosting.Nats (13)
NatsBuilderExtensions.cs (12)
31
public static IResourceBuilder<
NatsServerResource
> AddNats(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port)
48
public static IResourceBuilder<
NatsServerResource
> AddNats(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null,
57
var
nats = new NatsServerResource(name, userName?.Resource, passwordParameter);
94
.WithEndpoint(targetPort: 4222, port: port, name:
NatsServerResource
.PrimaryEndpointName)
114
public static IResourceBuilder<
NatsServerResource
> WithJetStream(this IResourceBuilder<
NatsServerResource
> builder, string? srcMountPath = null)
132
public static IResourceBuilder<
NatsServerResource
> WithJetStream(this IResourceBuilder<
NatsServerResource
> builder)
146
public static IResourceBuilder<
NatsServerResource
> WithDataVolume(this IResourceBuilder<
NatsServerResource
> builder, string? name = null, bool isReadOnly = false)
162
public static IResourceBuilder<
NatsServerResource
> WithDataBindMount(this IResourceBuilder<
NatsServerResource
> builder, string source, bool isReadOnly = false)
NatsServerResource.cs (1)
22
/// Initializes a new instance of the <see cref="
NatsServerResource
"/> class.
Aspire.Hosting.Nats.Tests (11)
AddNatsTests.cs (8)
49
var
natsResource = Assert.Single(appModel.Resources.OfType<
NatsServerResource
>());
78
var connectionStringResource = Assert.Single(appModel.Resources.OfType<
NatsServerResource
>()) as IResourceWithConnectionString;
96
var
containerResource = Assert.Single(appModel.Resources.OfType<
NatsServerResource
>());
138
var
containerResource = Assert.Single(appModel.Resources.OfType<
NatsServerResource
>());
179
Assert.Equal(2, builder.Resources.OfType<
NatsServerResource
>().Count());
NatsPublicApiTests.cs (3)
43
IResourceBuilder<
NatsServerResource
> builder = null!;
54
IResourceBuilder<
NatsServerResource
> builder = null!;
65
IResourceBuilder<
NatsServerResource
> builder = null!;