Table of Contents

Method GetDependencyAsync

Namespace
WhalesSecret.TradeScriptLib.API
Assembly
WhalesSecret.TradeScriptLib.dll

GetDependencyAsync<TInterface>(string, string)

Gets an object representing remote interface.

Task<TInterface> GetDependencyAsync<TInterface>(string packageName, string scriptName)

Parameters

packageName string

Name of the package that contains the script that implements the dependency interface.

scriptName string

Name of the script in the package that implements the dependency interface.

Returns

Task<TInterface>

Object that represents the remote interface.

Type Parameters

TInterface

Type of the dependency interface.

Exceptions

MalfunctionException

Thrown when an internal error occurred. This can happen for example when the Core process terminates unexpectedly.

DependencyNotFoundException

Thrown when the requested dependency cannot be found.

UnsupportedDependencyInterfaceException

Thrown when the requested dependency interface is of unsupported type.

OperationCanceledException

Thrown if the operation was cancelled.

NotConnectedException

Thrown if the request cannot be sent to the Core process.

InvalidArgumentException

Thrown if packageName or scriptName is null or too long.