src/packages/EmbedIO/Security/IPBanningModuleExtensions.cs
/// <summary>
/// Add a collection of Regex to match the log messages against as a criterion for banning IP addresses.
/// </summary>
/// <typeparam name="TModule">The type of the module.</typeparam>
/// <param name="this">The module on which this method is called.</param>
/// <param name="maxMatchCount">The maximum match count.</param>
/// <param name="secondsMatchingPeriod">The seconds matching period.</param>
/// <param name="value">A collection of regex to match log messages against.</param>
/// <returns>
///   <paramref name="this" /> with a fail regex criterion configured.
/// </returns>
Add a collection of Regex to match the log messages against as a criterion for banning IP addresses.
Add a collection of Regex to match the log messages against as a criterion for banning IP addresses .
public static TModule WithRegexRules<TModule>(
            this TModule @this,
            int maxMatchCount,
            int secondsMatchingPeriod,
            params string[] value)
            where TModule : IPBanningModule
        {
            @this.RegisterCriterion(new IPBanningRegexCriterion(@this, value, maxMatchCount, secondsMatchingPeriod));
            return @this;
        }
public static TModule WithRegexRules < TModule > ( this TModule @this , int maxMatchCount , int secondsMatchingPeriod , params string [ ] value ) where TModule : IPBanningModule { @this . RegisterCriterion ( new IPBanningRegexCriterion ( @this , value , maxMatchCount , secondsMatchingPeriod ) ) ; return @this ; }
Add a collection of Regex to match the log messages against as a criterion for banning IP addresses.
Add a collection of Regex to match the log messages against as a criterion for banning IP addresses .
with a fail regex criterion configured.
with a fail regex criterion configured .
TModule
this
maxMatchCount
int
The maximum match count.
The maximum match count .
secondsMatchingPeriod
int
The seconds matching period.
The seconds matching period .
this
The module on which this method is called.
The module on which this method is called .
value
A collection of regex to match log messages against.
A collection of regex to match log messages against .
typeparam
The type of the module.
The type of the module .