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