C# Class WolframAPI.WAClient

Used to access Wolfram Alpha. Submits expressions, retrieves and parses responses.
Afficher le fichier Open project: Schumix/Schumix2 Class Usage Examples

Méthodes publiques

Méthode Description
GetResult ( string expression ) : WAResult

Gets the result of the specified expression.

The expression is returned as WAResult

so you can manually go through the pods of the response (to get ANY information you'd like)

It is encouraged to use this method instead of Solve

GetResultAsync ( string expression ) : void

Gets the result of the specified expression asynchronously.

The expression is returned as WAResult

so you can manually go through the pods of the response (to get ANY information you'd like)

It is encouraged to use this method instead of Solve

An event is raised upon completion.

Parse ( string response ) : WAResult

Parses the raw response.

Solve ( string expression ) : string

Solves the specified expression.

SolveAsync ( string expression ) : void

Solves the specified expression asynchronously. An event is raised on completion.

Submit ( string expression ) : string

Submits the specified expression and returns the raw result.

WAClient ( string appId ) : System

Initializes a new instance of the WAClient class.

Private Methods

Méthode Description
HandleResultReceived ( IAsyncResult ar ) : void
HandleSolutionReceived ( IAsyncResult ar ) : void

Method Details

GetResult() public méthode

Gets the result of the specified expression.

The expression is returned as WAResult

so you can manually go through the pods of the response (to get ANY information you'd like)

It is encouraged to use this method instead of Solve

Throws in case of any error. Throws if the specified argument is null.
public GetResult ( string expression ) : WAResult
expression string The expression to solve.
Résultat WAResult

GetResultAsync() public méthode

Gets the result of the specified expression asynchronously.

The expression is returned as WAResult

so you can manually go through the pods of the response (to get ANY information you'd like)

It is encouraged to use this method instead of Solve

An event is raised upon completion.
Throws in case of any error. Throws if the specified argument is null.
public GetResultAsync ( string expression ) : void
expression string The expression to solve.
Résultat void

Parse() public static méthode

Parses the raw response.
Throws in case of any error. Throws if the specified argument is null.
public static Parse ( string response ) : WAResult
response string The response to parse
Résultat WAResult

Solve() public méthode

Solves the specified expression.
Throws in case of any error. Throws if the specified argument is null.
public Solve ( string expression ) : string
expression string The expression.
Résultat string

SolveAsync() public méthode

Solves the specified expression asynchronously. An event is raised on completion.
Throws in case of any error. Throws if the specified argument is null.
public SolveAsync ( string expression ) : void
expression string The expression.
Résultat void

Submit() public méthode

Submits the specified expression and returns the raw result.
Throws in case of any error. Throws if the specified argument is null.
public Submit ( string expression ) : string
expression string The expression to post.
Résultat string

WAClient() public méthode

Initializes a new instance of the WAClient class.
public WAClient ( string appId ) : System
appId string The application ID provided by Wolfram. You have to request one for each of your apps.
Résultat System