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