src/packages/EmbedIO/WebModuleContainerExtensions-Actions.cs
/// <summary>
/// Creates an instance of <see cref="ActionModule"/> and adds it 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="verb">The HTTP verb that will be served by <paramref name="handler"/>.</param>
/// <param name="handler">The callback used to handle requests.</param>
/// <returns><paramref name="this"/> with a <see cref="ActionModule"/> added.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <seealso cref="ActionModule"/>
/// <seealso cref="IWebModuleContainer.Modules"/>
/// <seealso cref="IComponentCollection{T}.Add"/>
Creates an instance of  and adds it to a module container.
Creates an instance of and adds it to a module container .
public static TContainer WithAction<TContainer>(this TContainer @this, string baseRoute, HttpVerb verb, RequestHandlerCallback handler)
            where TContainer : class, IWebModuleContainer
        {
            @this.Modules.Add(new ActionModule(baseRoute, verb, handler));
            return @this;
        }
public static TContainer WithAction < TContainer > ( this TContainer @this , string baseRoute , HttpVerb verb , RequestHandlerCallback handler ) where TContainer : class , IWebModuleContainer { @this . Modules . Add ( new ActionModule ( baseRoute , verb , handler ) ) ; return @this ; }
Creates an instance of  and adds it to a module container.
Creates an instance of and adds it to a module container .
with a  added.
with a added .
None
TContainer
this
baseRoute
string
The base route of the module.
The base route of the module .
verb
HttpVerb
The HTTP verb that will be served by .
The HTTP verb that will be served by .
handler
RequestHandlerCallback
The callback used to handle requests.
The callback used to handle requests .
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