src/packages/EmbedIO/WebModuleContainerExtensions-Files.cs
/// <summary>
/// Creates an instance of <see cref="ResourceFileProvider"/>, uses it to initialize
/// a <seealso cref="FileModule"/>, and adds the latter to a module container.
/// </summary>
/// <typeparam name="TContainer">The type of the module container.</typeparam>
/// <param name="this">The <typeparamref name="TContainer"/> on which this method is called.</param>
/// <param name="baseRoute">The base route of the module.</param>
/// <param name="assembly">The assembly where served files are contained as embedded resources.</param>
/// <param name="pathPrefix">A string to prepend to provider-specific paths
/// to form the name of a manifest resource in <paramref name="assembly"/>.</param>
/// <param name="configure">A callback used to configure the module.</param>
/// <returns><paramref name="this"/> with a <see cref="FileModule"/> added.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="assembly"/> is <see langword="null"/>.</exception>
/// <seealso cref="FileModule"/>
/// <seealso cref="ResourceFileProvider"/>
/// <seealso cref="IWebModuleContainer.Modules"/>
/// <seealso cref="IComponentCollection{T}.Add"/>
Creates an instance of , uses it to initialize
a , and adds the latter to a module container.
Creates an instance of uses it to initialize a and adds the latter to a module container .
public static TContainer WithEmbeddedResources<TContainer>(
            this TContainer @this,
            string baseRoute,
            Assembly assembly,
            string pathPrefix,
            Action<FileModule>? configure = null)
            where TContainer : class, IWebModuleContainer
            => WithEmbeddedResources(@this, null, baseRoute, assembly, pathPrefix, configure);
public static TContainer WithEmbeddedResources < TContainer > ( this TContainer @this , string baseRoute , Assembly assembly , string pathPrefix , Action < FileModule > ? configure = null ) where TContainer : class , IWebModuleContainer => WithEmbeddedResources ( @this , null , baseRoute , assembly , pathPrefix , configure ) ;
Creates an instance of , uses it to initialize
a , and adds the latter to a module container.
Creates an instance of uses it to initialize a and adds the latter to a module container .
with a  added.
with a added .
None
None
TContainer
this
baseRoute
string
The base route of the module.
The base route of the module .
assembly
Assembly
The assembly where served files are contained as embedded resources.
The assembly where served files are contained as embedded resources .
pathPrefix
string
A string to prepend to provider-specific paths
to form the name of a manifest resource in .
A string to prepend to provider - specific paths to form the name of a manifest resource in .
configure
Action<FileModule>?
A callback used to configure the module.
A callback used to configure the module .
this
The  on which this method is called.
The on which this method is called .
typeparam
The type of the module container.
The type of the module container .
seealso
None
seealso
None
seealso
None
seealso
None