3 instantiations of MongoDBServerResource
Aspire.Hosting.MongoDB.Tests (3)
MongoDBPublicApiTests.cs (3)
148var action = () => new MongoDBServerResource(name); 159var parent = new MongoDBServerResource("mongodb"); 172var parent = new MongoDBServerResource(name);
30 references to MongoDBServerResource
Aspire.Hosting.MongoDB (18)
MongoDBBuilderExtensions.cs (13)
34public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port) 48public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder, 59var mongoDBContainer = new MongoDBServerResource(name, userName?.Resource, passwordParameter); 78.WithEndpoint(port: port, targetPort: DefaultContainerPort, name: MongoDBServerResource.PrimaryEndpointName) 96public static IResourceBuilder<MongoDBDatabaseResource> AddDatabase(this IResourceBuilder<MongoDBServerResource> builder, [ResourceName] string name, string? databaseName = null) 136public static IResourceBuilder<T> WithMongoExpress<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<MongoExpressContainerResource>>? configureContainer = null, string? containerName = null) where T : MongoDBServerResource 178public static IResourceBuilder<MongoDBServerResource> WithDataVolume(this IResourceBuilder<MongoDBServerResource> builder, string? name = null, bool isReadOnly = false) 192public static IResourceBuilder<MongoDBServerResource> WithDataBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = false) 207public static IResourceBuilder<MongoDBServerResource> WithInitBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = true) 215private static void ConfigureMongoExpressContainer(EnvironmentCallbackContext context, MongoDBServerResource resource)
MongoDBDatabaseResource.cs (5)
7/// A resource that represents a MongoDB database. This is a child resource of a <see cref="MongoDBServerResource"/>. 9public class MongoDBDatabaseResource : Resource, IResourceWithParent<MongoDBServerResource>, IResourceWithConnectionString 12/// A resource that represents a MongoDB database. This is a child resource of a <see cref="MongoDBServerResource"/>. 17public MongoDBDatabaseResource(string name, string databaseName, MongoDBServerResource parent) : base(name) 34public MongoDBServerResource Parent { get; }
Aspire.Hosting.MongoDB.Tests (12)
AddMongoDBTests.cs (4)
26var containerResource = Assert.Single(appModel.Resources.OfType<MongoDBServerResource>()); 54var containerResource = Assert.Single(appModel.Resources.OfType<MongoDBServerResource>());
MongoDBPublicApiTests.cs (8)
39IResourceBuilder<MongoDBServerResource> builder = null!; 64IResourceBuilder<MongoDBServerResource> builder = null!; 75IResourceBuilder<MongoDBServerResource> builder = null!; 100IResourceBuilder<MongoDBServerResource> builder = null!; 111IResourceBuilder<MongoDBServerResource> builder = null!; 159var parent = new MongoDBServerResource("mongodb"); 172var parent = new MongoDBServerResource(name); 185MongoDBServerResource parent = null!;