C# Класс WolframAPI.WAClient

Used to access Wolfram Alpha. Submits expressions, retrieves and parses responses.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

Приватные методы

Метод Описание
HandleResultReceived ( IAsyncResult ar ) : void
HandleSolutionReceived ( IAsyncResult ar ) : void

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

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

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.
Результат WAResult

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

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.
Результат void

Parse() публичный статический Метод

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
Результат WAResult

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

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.
Результат string

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

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.
Результат void

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

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.
Результат string

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

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.
Результат System