C# Класс DevRainSolutions.KyivSmartCity.New.Models.SpamProtectionAttribute

Verifies that a form has not been submitted in a too short timespan. Used in POST scenarios to ensure that no spam-bot is performing the request.
Наследование: System.Web.Mvc.FilterAttribute, IAuthorizationFilter
Показать файл Открыть проект

Открытые методы

Метод Описание
OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void

Called when a process requests authorization.

SpamProtectionAttribute ( ) : System

Initializes a new instance of the SpamProtectionAttribute class.

SpamProtectionAttribute ( int timespan ) : System

Initializes a new instance of the SpamProtectionAttribute class.

Описание методов

OnAuthorization() публичный Метод

Called when a process requests authorization.
public OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void
filterContext System.Web.Mvc.AuthorizationContext The filter context.
Результат void

SpamProtectionAttribute() публичный Метод

Initializes a new instance of the SpamProtectionAttribute class.
public SpamProtectionAttribute ( ) : System
Результат System

SpamProtectionAttribute() публичный Метод

Initializes a new instance of the SpamProtectionAttribute class.
public SpamProtectionAttribute ( int timespan ) : System
timespan int The he minimum timespan between GET- and POST-request.
Результат System