Unosquare
    Show / Hide Table of Contents

    Class WebModuleContainerExtensions

    Contains extension methods for types implementing IWebModuleContainer.

    Inheritance
    Object
    WebModuleContainerExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO
    Syntax
    public static class WebModuleContainerExtensions

    Methods

    OnAny<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all requests and adds it to a module container.

    Declaration
    public static TContainer OnAny<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnAny<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all requests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnAny<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnDelete<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all DELETErequests and adds it to a module container.

    Declaration
    public static TContainer OnDelete<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnDelete<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all DELETErequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnDelete<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnGet<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all GETrequests and adds it to a module container.

    Declaration
    public static TContainer OnGet<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnGet<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all GETrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnGet<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnHead<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all HEADrequests and adds it to a module container.

    Declaration
    public static TContainer OnHead<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnHead<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all HEADrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnHead<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnOptions<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all OPTIONSrequests and adds it to a module container.

    Declaration
    public static TContainer OnOptions<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnOptions<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all OPTIONSrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnOptions<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPatch<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all PATCHrequests and adds it to a module container.

    Declaration
    public static TContainer OnPatch<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPatch<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all PATCHrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnPatch<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPost<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all POSTrequests and adds it to a module container.

    Declaration
    public static TContainer OnPost<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPost<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all POSTrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnPost<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPut<TContainer>(TContainer, RequestHandlerCallback)

    Creates an instance of that intercepts all PUTrequests and adds it to a module container.

    Declaration
    public static TContainer OnPut<TContainer>(this TContainer this, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    OnPut<TContainer>(TContainer, String, RequestHandlerCallback)

    Creates an instance of that intercepts all PUTrequests under the specified baseRoute and adds it to a module container.

    Declaration
    public static TContainer OnPut<TContainer>(this TContainer this, string baseRoute, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithAction<TContainer>(TContainer, HttpVerb, RequestHandlerCallback)

    Creates an instance of with a base URL path of "/" and adds it to a module container.

    Declaration
    public static TContainer WithAction<TContainer>(this TContainer this, HttpVerb verb, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    HttpVerb verb

    The HTTP verb that will be served by handler.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithAction<TContainer>(TContainer, String, HttpVerb, RequestHandlerCallback)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithAction<TContainer>(this TContainer this, string baseRoute, HttpVerb verb, RequestHandlerCallback handler)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    HttpVerb verb

    The HTTP verb that will be served by handler.

    RequestHandlerCallback handler

    The callback used to handle requests.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithCors<TContainer>(TContainer, String, String, String)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithCors<TContainer>(this TContainer this, string origins = null, string headers = null, string methods = null)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String origins

    The valid origins. Default is "*", meaning all origins.

    String headers

    The valid headers. Default is "*", meaning all headers.

    String methods

    The valid method. Default is "*", meaning all methods.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    WithCors<TContainer>(TContainer, String, String, String, String)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithCors<TContainer>(this TContainer this, string baseRoute, string origins, string headers, string methods)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    String origins

    The valid origins. Default is "*", meaning all origins.

    String headers

    The valid headers. Default is "*", meaning all headers.

    String methods

    The valid method. Default is "*", meaning all methods.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    WithEmbeddedResources<TContainer>(TContainer, String, Assembly, String, Nullable<Action<FileModule>>)

    Creates an instance of , uses it to initialize a , and adds the latter to a module container.

    Declaration
    public static TContainer WithEmbeddedResources<TContainer>(this TContainer this, string baseRoute, Assembly assembly, string pathPrefix, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    Assembly assembly

    The assembly where served files are contained as embedded resources.

    String pathPrefix

    A string to prepend to provider-specific paths to form the name of a manifest resource in assembly.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithEmbeddedResources<TContainer>(TContainer, String, String, Assembly, String, Nullable<Action<FileModule>>)

    Creates an instance of , uses it to initialize a , and adds the latter to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithEmbeddedResources<TContainer>(this TContainer this, string name, string baseRoute, Assembly assembly, string pathPrefix, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    Assembly assembly

    The assembly where served files are contained as embedded resources.

    String pathPrefix

    A string to prepend to provider-specific paths to form the name of a manifest resource in assembly.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithIPBanning<TContainer>(TContainer, Nullable<Action<IPBanningModule>>, Nullable<IEnumerable<String>>, Int32)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithIPBanning<TContainer>(this TContainer this, Action<IPBanningModule>? configure, IEnumerable<string>? whiteList = default(IEnumerable<string>? ), int banMinutes = default(int))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    Nullable<Action<IPBanningModule>> configure

    The configure.

    Nullable<IEnumerable<String>> whiteList

    A collection of valid IPs that never will be banned.

    Int32 banMinutes

    Minutes that an IP will remain banned.

    Returns
    Type Description
    TContainer

    this with an added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    WithIPBanning<TContainer>(TContainer, Nullable<IEnumerable<String>>, Int32)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithIPBanning<TContainer>(this TContainer this, IEnumerable<string>? whiteList = default(IEnumerable<string>? ), int banMinutes = default(int))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    Nullable<IEnumerable<String>> whiteList

    A collection of valid IPs that never will be banned.

    Int32 banMinutes

    Minutes that an IP will remain banned.

    Returns
    Type Description
    TContainer

    this with an added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    WithModule<TContainer>(TContainer, IWebModule)

    Adds the specified module to a module container, without giving it a name.

    Declaration
    public static TContainer WithModule<TContainer>(this TContainer this, IWebModule module)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    IWebModule module

    The module.

    Returns
    Type Description
    TContainer

    this with module added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithModule<TContainer>(TContainer, String, IWebModule)

    Adds the specified module to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithModule<TContainer>(this TContainer this, string name, IWebModule module)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    IWebModule module

    The module.

    Returns
    Type Description
    TContainer

    this with module added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithModule<TContainer, TWebModule>(TContainer, TWebModule, Nullable<Action<TWebModule>>)

    Adds the specified module to a module container, without giving it a name.

    Declaration
    public static TContainer WithModule<TContainer, TWebModule>(this TContainer this, TWebModule module, Action<TWebModule>? configure)
        where TContainer : class, IWebModuleContainer where TWebModule : IWebModule
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    TWebModule module

    The module.

    Nullable<Action<TWebModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with module added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    TWebModule

    The type of the module.

    See Also
    Modules

    WithModule<TContainer, TWebModule>(TContainer, String, TWebModule, Nullable<Action<TWebModule>>)

    Adds the specified module to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithModule<TContainer, TWebModule>(this TContainer this, string name, TWebModule module, Action<TWebModule>? configure)
        where TContainer : class, IWebModuleContainer where TWebModule : IWebModule
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    TWebModule module

    The module.

    Nullable<Action<TWebModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with module added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    TWebModule

    The type of the module.

    See Also
    Modules

    WithRouting<TContainer>(TContainer, String, Action<RoutingModule>)

    Creates an instance of and adds it to a module container.

    Declaration
    public static TContainer WithRouting<TContainer>(this TContainer this, string baseRoute, Action<RoutingModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    Action<RoutingModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithRouting<TContainer>(TContainer, String, String, Action<RoutingModule>)

    Creates an instance of and adds it to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithRouting<TContainer>(this TContainer this, string name, string baseRoute, Action<RoutingModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    Action<RoutingModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithStaticFolder<TContainer>(TContainer, String, String, Boolean, Nullable<Action<FileModule>>)

    Creates an instance of , uses it to initialize a , and adds the latter to a module container.

    Declaration
    public static TContainer WithStaticFolder<TContainer>(this TContainer this, string baseRoute, string fileSystemPath, bool isImmutable, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    String fileSystemPath

    The path of the directory to serve.

    Boolean isImmutable

    true if files and directories in fileSystemPath are not expected to change during a web server's lifetime; false otherwise.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithStaticFolder<TContainer>(TContainer, String, String, String, Boolean, Nullable<Action<FileModule>>)

    Creates an instance of , uses it to initialize a , and adds the latter to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithStaticFolder<TContainer>(this TContainer this, string name, string baseRoute, string fileSystemPath, bool isImmutable, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    String fileSystemPath

    The path of the directory to serve.

    Boolean isImmutable

    true if files and directories in fileSystemPath are not expected to change during a web server's lifetime; false otherwise.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    Remarks

    OSX doesn't support , the parameter isImmutable will be always true.

    See Also
    Modules

    WithWebApi<TContainer>(TContainer, String, Action<WebApiModule>)

    Creates an instance of using the default response serializer and adds it to a module container without giving it a name.

    Declaration
    public static TContainer WithWebApi<TContainer>(this TContainer this, string baseRoute, Action<WebApiModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    Action<WebApiModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithWebApi<TContainer>(TContainer, String, ResponseSerializerCallback, Action<WebApiModule>)

    Creates an instance of using the specified response serializer and adds it to a module container without giving it a name.

    Declaration
    public static TContainer WithWebApi<TContainer>(this TContainer this, string baseRoute, ResponseSerializerCallback serializer, Action<WebApiModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    ResponseSerializerCallback serializer

    A ResponseSerializerCallback used to serialize the result of controller methods returning langword_csharp_object or Task<object>.

    Action<WebApiModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithWebApi<TContainer>(TContainer, String, String, Action<WebApiModule>)

    Creates an instance of using the default response serializer and adds it to a module container, giving it the specified name if not null

    Declaration
    public static TContainer WithWebApi<TContainer>(this TContainer this, string name, string baseRoute, Action<WebApiModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    Action<WebApiModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithWebApi<TContainer>(TContainer, String, String, ResponseSerializerCallback, Action<WebApiModule>)

    Creates an instance of , using the specified response serializer and adds it to a module container, giving it the specified name if not null

    Declaration
    public static TContainer WithWebApi<TContainer>(this TContainer this, string name, string baseRoute, ResponseSerializerCallback serializer, Action<WebApiModule> configure)
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    ResponseSerializerCallback serializer

    A ResponseSerializerCallback used to serialize the result of controller methods returning langword_csharp_object or Task<object>.

    Action<WebApiModule> configure

    A callback used to configure the newly-created .

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithZipFile<TContainer>(TContainer, String, String, Nullable<Action<FileModule>>)

    Creates an instance of using a file-system path, uses it to initialize a , and adds the latter to a module container.

    Declaration
    public static TContainer WithZipFile<TContainer>(this TContainer this, string baseRoute, string zipFilePath, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    String zipFilePath

    The local path of the Zip file.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithZipFile<TContainer>(TContainer, String, String, String, Nullable<Action<FileModule>>)

    Creates an instance of using a file-system path, uses it to initialize a , and adds the latter to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithZipFile<TContainer>(this TContainer this, string name, string baseRoute, string zipFilePath, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    String zipFilePath

    The zip file-system path.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithZipFileStream<TContainer>(TContainer, String, Stream, Nullable<Action<FileModule>>)

    Creates an instance of using a zip file as stream, uses it to initialize a , and adds the latter to a module container.

    Declaration
    public static TContainer WithZipFileStream<TContainer>(this TContainer this, string baseRoute, Stream zipFileStream, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String baseRoute

    The base route of the module.

    Stream zipFileStream

    The zip file as stream.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    WithZipFileStream<TContainer>(TContainer, String, String, Stream, Nullable<Action<FileModule>>)

    Creates an instance of using a zip file as stream, uses it to initialize a , and adds the latter to a module container, giving it the specified name if not null.

    Declaration
    public static TContainer WithZipFileStream<TContainer>(this TContainer this, string name, string baseRoute, Stream zipFileStream, Action<FileModule>? configure = default(Action<FileModule>? ))
        where TContainer : class, IWebModuleContainer
    Parameters
    Type Name Description
    TContainer this

    The TContainer on which this method is called.

    String name

    The name.

    String baseRoute

    The base route of the module.

    Stream zipFileStream

    The zip file as stream.

    Nullable<Action<FileModule>> configure

    A callback used to configure the module.

    Returns
    Type Description
    TContainer

    this with a added.

    Type Parameters
    Name Description
    TContainer

    The type of the module container.

    See Also
    Modules

    Comments

    Back to top Copyright © 2017-2019 Unosquare