src/packages/EmbedIO/WebModuleContainerExtensions-WebApi.cs
/// <summary>
/// Creates an instance of <see cref="WebApiModule"/> using the default response serializer
/// and adds it to a module container, giving it the specified <paramref name="name"/>
/// if not <see langword="null"/>
/// </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="name">The name.</param>
/// <param name="baseRoute">The base route of the module.</param>
/// <param name="configure">A callback used to configure the newly-created <see cref="WebApiModule"/>.</param>
/// <returns><paramref name="this"/> with a <see cref="RoutingModule"/> added.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="configure"/> is <see langword="null"/>.</exception>
/// <seealso cref="WebApiModule"/>
/// <seealso cref="WebApiModuleExtensions"/>
/// <seealso cref="IWebModuleContainer.Modules"/>
/// <seealso cref="IComponentCollection{T}.Add"/>
Creates an instance of  using the default response serializer
and adds it to a module container, giving it the specified
if not
Creates an instance of using the default response serializer and adds it to a module container giving it the specified if not
public static TContainer WithWebApi<TContainer>(
            this TContainer @this,
            string? name,
            string baseRoute,
            Action<WebApiModule> configure)
            where TContainer : class, IWebModuleContainer
        {
            configure = Validate.NotNull(nameof(configure), configure);
            var module = new WebApiModule(baseRoute);
            return WithModule(@this, name, module, configure);
        }
public static TContainer WithWebApi < TContainer > ( this TContainer @this , string ? name , string baseRoute , Action < WebApiModule > configure ) where TContainer : class , IWebModuleContainer { configure = Validate . NotNull ( nameof ( configure ) , configure ) ; var module = new WebApiModule ( baseRoute ) ; return WithModule ( @this , name , module , configure ) ; }
Creates an instance of  using the default response serializer
and adds it to a module container, giving it the specified
if not
Creates an instance of using the default response serializer and adds it to a module container giving it the specified if not
with a  added.
with a added .
None
None
TContainer
this
name
string?
None
baseRoute
string
The base route of the module.
The base route of the module .
configure
Action<WebApiModule>
A callback used to configure the newly-created .
A callback used to configure the newly - created .
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