MailPitHostingExtension Methods
Class Methods 3 members
Provides extension methods for adding MailPit to an
Hosting.IDistributedApplicationBuilder. AddMailPit(IDistributedApplicationBuilder, string, int?, int?) Section titled AddMailPit(IDistributedApplicationBuilder, string, int?, int?) extension IResourceBuilder<MailPitContainerResource> Adds a MailPit container resource to the
Hosting.IDistributedApplicationBuilder. public static class MailPitHostingExtension{ public static IResourceBuilder<MailPitContainerResource> AddMailPit( this IDistributedApplicationBuilder builder, string name, int? httpPort = null, int? smtpPort = null) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to which the MailPit resource will be added. name string The name of the MailPit container resource. httpPort int? optional Optional. The HTTP port on which MailPit will listen. smtpPort int? optional Optional. The SMTP port on which MailPit will listen. Returns
IResourceBuilder<MailPitContainerResource> A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration. WithDataBindMount(IResourceBuilder<MailPitContainerResource>, string, bool) Section titled WithDataBindMount(IResourceBuilder<MailPitContainerResource>, string, bool) extension IResourceBuilder<MailPitContainerResource> Configures a bind mount for the data directory of the MailPit container resource.
public static class MailPitHostingExtension{ public static IResourceBuilder<MailPitContainerResource> WithDataBindMount( this IResourceBuilder<MailPitContainerResource> builder, string source, bool isReadOnly = false) { // ... }}Parameters
builder IResourceBuilder<MailPitContainerResource> The ApplicationModel.IResourceBuilder`1 to configure the bind mount on. source string The source path on the host system to bind to the container. isReadOnly bool optional A value indicating whether the bind mount should be read-only. Default is false. Returns
IResourceBuilder<MailPitContainerResource> A reference to the ApplicationModel.IResourceBuilder`1 with the configured bind mount. WithDataVolume(IResourceBuilder<MailPitContainerResource>, string, bool) Section titled WithDataVolume(IResourceBuilder<MailPitContainerResource>, string, bool) extension IResourceBuilder<MailPitContainerResource> Configures a data volume for the MailPit container resource.
public static class MailPitHostingExtension{ public static IResourceBuilder<MailPitContainerResource> WithDataVolume( this IResourceBuilder<MailPitContainerResource> builder, string name, bool isReadOnly = false) { // ... }}Parameters
builder IResourceBuilder<MailPitContainerResource> The ApplicationModel.IResourceBuilder`1 used to configure the resource. name string The name of the data volume to be mounted. isReadOnly bool optional A boolean indicating whether the volume should be mounted as read-only. Returns
IResourceBuilder<MailPitContainerResource> A reference to the ApplicationModel.IResourceBuilder`1 for further configuration.