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) { // ... }}Parameters
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. 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?) 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) { // ... }}Parameters
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. Returns
IResourceBuilder<AdminerContainerResource> The resource builder for Adminer.