C# Class Encog.Bot.BotUtil

Utility class for bots.
Datei anzeigen Open project: encog/encog-silverlight-core Class Usage Examples

Public Properties

Property Type Description
BufferSize int

Public Methods

Method Description
Extract ( String str, String token1, String token2, int index ) : String

This method is very useful for grabbing information from a HTML page.

ExtractFromIndex ( String str, String token1, String token2, int index, int occurence ) : String

This method is very useful for grabbing information from a HTML page.

LoadPage ( Uri url ) : String

Load the specified web page into a string.

POSTPage ( Uri uri, String>.IDictionary param ) : String

Post to a page.

POSTPage ( Uri uri, byte bytes, int length ) : String

Post bytes to a page.

POSTPage ( Uri uri, Stream stream ) : string

Post to a page.

Private Methods

Method Description
BotUtil ( ) : System

Private constructor.

Method Details

Extract() public static method

This method is very useful for grabbing information from a HTML page.
public static Extract ( String str, String token1, String token2, int index ) : String
str String The string to search.
token1 String The text, or tag, that comes before the desired text.
token2 String The text, or tag, that comes after the desired text.
index int Which occurrence of token1 to use, 1 for the first.
return String

ExtractFromIndex() public static method

This method is very useful for grabbing information from a HTML page.
public static ExtractFromIndex ( String str, String token1, String token2, int index, int occurence ) : String
str String The string to search.
token1 String The text, or tag, that comes before the desired text
token2 String The text, or tag, that comes after the desired text
index int Index in the string to start searching from.
occurence int What occurence.
return String

LoadPage() public static method

Load the specified web page into a string.
public static LoadPage ( Uri url ) : String
url System.Uri The url to load.
return String

POSTPage() public static method

Post to a page.
public static POSTPage ( Uri uri, String>.IDictionary param ) : String
uri System.Uri The URI to post to.
param String>.IDictionary The post params.
return String

POSTPage() public static method

Post bytes to a page.
public static POSTPage ( Uri uri, byte bytes, int length ) : String
uri System.Uri The URI to post to.
bytes byte The bytes to post.
length int The length of the posted data.
return String

POSTPage() public static method

Post to a page.
public static POSTPage ( Uri uri, Stream stream ) : string
uri System.Uri The URI to post to.
stream Stream The stream.
return string

Property Details

BufferSize public_oe static_oe property

How much data to read at once.
public static int BufferSize
return int