Share via


YarpResourceExtensions Class

Definition

Provides extension methods for adding YARP resources to the application model.

public static class YarpResourceExtensions
type YarpResourceExtensions = class
Public Module YarpResourceExtensions
Inheritance
YarpResourceExtensions

Methods

AddYarp(IDistributedApplicationBuilder, String)

Adds a YARP container to the application model.

WithConfiguration(IResourceBuilder<YarpResource>, Action<IYarpConfigurationBuilder>)

Configure the YARP resource.

WithHostPort(IResourceBuilder<YarpResource>, Nullable<Int32>)

Configures the host port that the YARP resource is exposed on instead of using randomly assigned port.

WithStaticFiles(IResourceBuilder<YarpResource>, String)

Enables static file serving in the YARP resource and bind mounts files from the specified source path to the wwwroot folder in the container.

WithStaticFiles(IResourceBuilder<YarpResource>)

Enables static file serving in the YARP resource. Static files are served from the wwwroot folder.

Applies to