Skip to content
Docs Try Aspire

AdminerBuilderExtensions Methods

Class Methods 2 members
Provides extension methods for Adminer resources to an Hosting.IDistributedApplicationBuilder.
AddAdminer(IDistributedApplicationBuilder, string, int?) Section titled AddAdminer(IDistributedApplicationBuilder, string, int?) extension IResourceBuilder<AdminerContainerResource>
Adds a Adminer container resource to the application.
public static class AdminerBuilderExtensions
{
public static IResourceBuilder<AdminerContainerResource> AddAdminer(
this IDistributedApplicationBuilder builder,
string name,
int? port = null)
{
// ...
}
}
builder IDistributedApplicationBuilder The resource builder.
name string The name of the resource. This name will be used as the connection string name when referenced in a dependency.
port int? optional The host port to bind the underlying container to.
IResourceBuilder<AdminerContainerResource> A reference to the ApplicationModel.IResourceBuilder`1.
Multiple AdminerBuilderExtensions.AddAdminer calls will return the same resource builder instance.
WithHostPort(IResourceBuilder<AdminerContainerResource>, int?) Section titled WithHostPort(IResourceBuilder<AdminerContainerResource>, int?) extension IResourceBuilder<AdminerContainerResource>
Configures the host port that the Adminer resource is exposed on instead of using randomly assigned port.
public static class AdminerBuilderExtensions
{
public static IResourceBuilder<AdminerContainerResource> WithHostPort(
this IResourceBuilder<AdminerContainerResource> builder,
int? port)
{
// ...
}
}
builder IResourceBuilder<AdminerContainerResource> The resource builder for Adminer.
port int? The port to bind on the host. If null is used random port will be assigned.
IResourceBuilder<AdminerContainerResource> The resource builder for Adminer.