Unosquare
    Show / Hide Table of Contents

    Class IPBanningRegexCriterion

    Represents a log message regex matching criterion for IPBanningModule.

    Inheritance
    Object
    IPBanningRegexCriterion
    Implements
    IIPBanningCriterion
    IDisposable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Security
    Syntax
    public class IPBanningRegexCriterion : IIPBanningCriterion, IDisposable

    Constructors

    IPBanningRegexCriterion(IPBanningModule, IEnumerable<String>, Int32, Int32)

    Initializes a new instance of the IPBanningRegexCriterion class.

    Declaration
    public IPBanningRegexCriterion(IPBanningModule parent, IEnumerable<string> rules, int maxMatchCount = 10, int secondsMatchingPeriod = 60)
    Parameters
    Type Name Description
    IPBanningModule parent

    The parent.

    IEnumerable<String> rules

    The rules.

    Int32 maxMatchCount

    The maximum match count.

    Int32 secondsMatchingPeriod

    The seconds matching period.

    Fields

    DefaultMaxMatchCount

    The default maximum match count per period.

    Declaration
    public const int DefaultMaxMatchCount = 10
    Field Value
    Type Description
    Int32

    DefaultSecondsMatchingPeriod

    The default matching period.

    Declaration
    public const int DefaultSecondsMatchingPeriod = 60
    Field Value
    Type Description
    Int32

    Methods

    ClearIPAddress(IPAddress)

    Clears the data generated by an IP address.

    Declaration
    public void ClearIPAddress(IPAddress address)
    Parameters
    Type Name Description
    IPAddress address

    The address.

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    Finalize()

    Finalizes an instance of the IPBanningRegexCriterion class.

    Declaration
    protected void Finalize()

    PurgeData()

    Purges the data of the Criterion.

    Declaration
    public void PurgeData()

    ValidateIPAddress(IPAddress)

    Validates the IP address should be banned or not.

    Declaration
    public Task<bool> ValidateIPAddress(IPAddress address)
    Parameters
    Type Name Description
    IPAddress address

    The address.

    Returns
    Type Description
    Task<Boolean>

    true if the IP Address should be banned, otherwise false.

    Implements

    IIPBanningCriterion
    IDisposable

    See Also

    IIPBanningCriterion

    Comments

    Back to top Copyright © 2017-2019 Unosquare