Skip to content
DocsTry Aspire
DocsTry

AdminerBuilderExtensions Methods

ClassMethods2 members
Provides extension methods for Adminer resources to an Hosting.IDistributedApplicationBuilder.
AddAdminer(IDistributedApplicationBuilder, string, int?)Section titled AddAdminer(IDistributedApplicationBuilder, string, int?)extensionIResourceBuilder<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)
{
// ...
}
}
builderIDistributedApplicationBuilderThe resource builder.
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
portint?optionalThe 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?)extensionIResourceBuilder<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)
{
// ...
}
}
builderIResourceBuilder<AdminerContainerResource>The resource builder for Adminer.
portint?The port to bind on the host. If null is used random port will be assigned.
IResourceBuilder<AdminerContainerResource>The resource builder for Adminer.