C# Класс Akismet.NET.Validator

This class is responsible validating information against Akismet.
Наследование: IValidator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_key String

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

Метод Описание
IsSpam ( Comment comment ) : System.Boolean

Check if the input comment is valid or not.

SubmitHam ( Comment comment ) : void

This call is intended for the marking of false positives, things that were incorrectly marked as spam.

SubmitSpam ( Comment comment ) : void

This call is for submitting comments that weren't marked as spam but should've been.

Validator ( String key ) : System

Initialize class members based on the input parameters

VerifyKey ( String domain ) : System.Boolean

Check if the validator's key is valid or not.

Защищенные методы

Метод Описание
ExtractResult ( String content ) : System.Boolean

Check the input data for valid content: "valid" string or "true" string.

PostRequest ( String url, NameValueCollection pars ) : String

Post parameters to the input url and return the response.

PreparePars ( Comment comment ) : NameValueCollection

Prepare request parameters based on the input comment.

PreparePars ( String key, String domain ) : NameValueCollection

Prepare request parameters based on the input parameters.

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

ExtractResult() защищенный Метод

Check the input data for valid content: "valid" string or "true" string.
protected ExtractResult ( String content ) : System.Boolean
content String The input content.
Результат System.Boolean

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

Check if the input comment is valid or not.
public IsSpam ( Comment comment ) : System.Boolean
comment Comment The input comment to be checked.
Результат System.Boolean

PostRequest() защищенный Метод

Post parameters to the input url and return the response.
protected PostRequest ( String url, NameValueCollection pars ) : String
url String The input url (absolute).
pars System.Collections.Specialized.NameValueCollection The input parameters to send.
Результат String

PreparePars() защищенный Метод

Prepare request parameters based on the input comment.
protected PreparePars ( Comment comment ) : NameValueCollection
comment Comment The input comment.
Результат System.Collections.Specialized.NameValueCollection

PreparePars() защищенный Метод

Prepare request parameters based on the input parameters.
protected PreparePars ( String key, String domain ) : NameValueCollection
key String The input key.
domain String The input domain.
Результат System.Collections.Specialized.NameValueCollection

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

This call is intended for the marking of false positives, things that were incorrectly marked as spam.
public SubmitHam ( Comment comment ) : void
comment Comment The input comment to be sent as ham.
Результат void

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

This call is for submitting comments that weren't marked as spam but should've been.
public SubmitSpam ( Comment comment ) : void
comment Comment The input comment to be sent as spam.
Результат void

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

Initialize class members based on the input parameters
public Validator ( String key ) : System
key String The input Akismet key.
Результат System

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

Check if the validator's key is valid or not.
public VerifyKey ( String domain ) : System.Boolean
domain String
Результат System.Boolean

Описание свойств

m_key защищенное свойство

The Akismet key, if any.
protected String m_key
Результат String