src/packages/EmbedIO/Files/FileModuleExtensions.cs
/// <summary>
/// Sets a <see cref="FileRequestHandlerCallback"/> that is called by a module whenever
/// the requested URL path has been mapped to a file or directory, but the request's
/// HTTP method is neither <c>GET</c> nor <c>HEAD</c>.
/// </summary>
/// <typeparam name="TModule">The type of the module on which this method is called.</typeparam>
/// <param name="this">The module on which this method is called.</param>
/// <param name="callback">The method to call.</param>
/// <returns><paramref name="this"/> with its <see cref="FileModule.OnMethodNotAllowed">OnMethodNotAllowed</see> property
/// set to <paramref name="callback"/>.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">The configuration of <paramref name="this"/> is locked.</exception>
/// <exception cref="ArgumentNullException"><paramref name="callback"/> is <see langword="null"/>.</exception>
/// <seealso cref="FileModule.OnMethodNotAllowed"/>
/// <seealso cref="FileRequestHandler"/>
Sets a  that is called by a module whenever
the requested URL path has been mapped to a file or directory, but the request's
HTTP method is neither GETHEAD
Sets a that is called by a module whenever the requested URL path has been mapped to a file or directory but the request ' s HTTP method is neither GETHEAD
public static TModule HandleMethodNotAllowed<TModule>(this TModule @this, FileRequestHandlerCallback callback)
            where TModule : FileModule
        {
            @this.OnMethodNotAllowed = callback;
            return @this;
        }
public static TModule HandleMethodNotAllowed < TModule > ( this TModule @this , FileRequestHandlerCallback callback ) where TModule : FileModule { @this . OnMethodNotAllowed = callback ; return @this ; }
Sets a  that is called by a module whenever
the requested URL path has been mapped to a file or directory, but the request's
HTTP method is neither GETHEAD
Sets a that is called by a module whenever the requested URL path has been mapped to a file or directory but the request ' s HTTP method is neither GETHEAD
with its OnMethodNotAllowed.
with its OnMethodNotAllowed .
None
The configuration of  is locked.
The configuration of is locked .
None
TModule
this
<not_specific>
callback
FileRequestHandlerCallback
The method to call.
The method to call .
this
<not_specific>
The module on which this method is called.
The module on which this method is called .
typeparam
The type of the module on which this method is called.
The type of the module on which this method is called .
seealso
None
seealso
None