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) { // ... }}Parameters
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.Returns
IResourceBuilder<AdminerContainerResource>A reference to the ApplicationModel.IResourceBuilder`1.Remarks
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) { // ... }}Parameters
builderIResourceBuilder<AdminerContainerResource>The resource builder for Adminer.portint?The port to bind on the host. If null is used random port will be assigned.Returns
IResourceBuilder<AdminerContainerResource>The resource builder for Adminer.