3 instantiations of MySqlServerResource
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
36var resource = new MySqlServerResource(name, passwordParameter);
Aspire.Hosting.MySql.Tests (2)
MySqlPublicApiTests.cs (2)
151var action = () => new MySqlServerResource(name, password); 163var action = () => new MySqlServerResource(name, password);
28 references to MySqlServerResource
Aspire.Hosting.MySql (19)
MySqlBuilderExtensions.cs (14)
29public static IResourceBuilder<MySqlServerResource> AddMySql(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<ParameterResource>? password = null, int? port = null) 36var resource = new MySqlServerResource(name, passwordParameter); 54.WithEndpoint(port: port, targetPort: 3306, name: MySqlServerResource.PrimaryEndpointName) // Internal port is always 3306. 71public static IResourceBuilder<MySqlDatabaseResource> AddDatabase(this IResourceBuilder<MySqlServerResource> builder, [ResourceName] string name, string? databaseName = null) 94public static IResourceBuilder<T> WithPhpMyAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PhpMyAdminContainerResource>>? configureContainer = null, string? containerName = null) where T : MySqlServerResource 117var mySqlInstances = builder.ApplicationBuilder.Resources.OfType<MySqlServerResource>(); 127var singleInstance = mySqlInstances.Single(); 150foreach (var mySqlInstance in mySqlInstances) 202public static IResourceBuilder<MySqlServerResource> WithDataVolume(this IResourceBuilder<MySqlServerResource> builder, string? name = null, bool isReadOnly = false) 216public static IResourceBuilder<MySqlServerResource> WithDataBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = false) 231public static IResourceBuilder<MySqlServerResource> WithInitBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = true)
MySqlDatabaseResource.cs (4)
7/// A resource that represents a MySQL database. This is a child resource of a <see cref="MySqlServerResource"/>. 12public class MySqlDatabaseResource(string name, string databaseName, MySqlServerResource parent) : Resource(name), IResourceWithParent<MySqlServerResource>, IResourceWithConnectionString 17public MySqlServerResource Parent { get; } = parent;
MySqlServerResource.cs (1)
14/// Initializes a new instance of the <see cref="MySqlServerResource"/> class.
Aspire.Hosting.MySql.Tests (9)
AddMySqlTests.cs (4)
46var containerResource = Assert.Single(appModel.Resources.OfType<MySqlServerResource>()); 143var mySqlResource = Assert.Single(appModel.Resources.OfType<MySqlServerResource>());
MySqlPublicApiTests.cs (5)
39IResourceBuilder<MySqlServerResource> builder = null!; 50IResourceBuilder<MySqlServerResource> builder = null!; 75IResourceBuilder<MySqlServerResource> builder = null!; 100IResourceBuilder<MySqlServerResource> builder = null!; 125IResourceBuilder<MySqlServerResource> builder = null!;