C# Class LitDev.LDCall

ファイルを表示 Open project: litdev1/LitDev

Public Methods

Method Description
CallAsync ( Primitive dll, Primitive extension, Primitive obj, Primitive method, Primitive arguments ) : Primitive

Call any extension method asynchronously. See example LDCallAsync. If dll, extension, obj and arguments are all "", then method may be a subroutine in your SmallBasic program.

CallInclude ( Primitive include, Primitive method ) : Primitive

Call a method in an included pre-compiled file.

Compile ( Primitive path ) : Primitive

Compile a secondary Small Basic file. Assumes that Small Basic is installed in the default location for your OS.

Function ( Primitive funcName, Primitive arg1 ) : Primitive

Call a Small Basic Sub as a function with one input argument. The input arguments(s) will be copied to an array called "args". The result should be put in a variable (may be an array) called "return". The variable "args" should be set to "" at the start of the program. The input parameter(s) are unchanged, while "args" and "return" are set to "" on return.

Function2 ( Primitive funcName, Primitive arg1, Primitive arg2 ) : Primitive

Call a Small Basic Sub as a function with two input arguments. See Function for more details.

Function3 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3 ) : Primitive

Call a Small Basic Sub as a function with three input arguments. See Function for more details.

Function4 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3, Primitive arg4 ) : Primitive

Call a Small Basic Sub as a function with four input arguments. See Function for more details.

Function5 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3, Primitive arg4, Primitive arg5 ) : Primitive

Call a Small Basic Sub as a function with five input arguments. See Function for more details.

Include ( Primitive path ) : Primitive

Reference a previously compiled program to use a subroutine method from.

Private Methods

Method Description
DoCall ( Object obj ) : void
Func ( string funcName, Primitive args ) : string
GetIncude ( string name ) : IncludeFile
GetNextIncude ( ) : int

Method Details

CallAsync() public static method

Call any extension method asynchronously. See example LDCallAsync. If dll, extension, obj and arguments are all "", then method may be a subroutine in your SmallBasic program.
public static CallAsync ( Primitive dll, Primitive extension, Primitive obj, Primitive method, Primitive arguments ) : Primitive
dll Primitive The extension dll (e.g. "LitDev.dll" or "SmallBasicLibrary.dll").
extension Primitive The extension namespace (usually the same as the dll name, e.g. "LitDev" or "MicroSoft.SmallBasic.Library" for SmallBasicLibrary.dll).
obj Primitive The extension object name.
method Primitive The extension method name.
arguments Primitive An array of arguments or "" for none. A single argument doesn't have to be in an array.
return Primitive

CallInclude() public static method

Call a method in an included pre-compiled file.
public static CallInclude ( Primitive include, Primitive method ) : Primitive
include Primitive The include file name returned by Include method.
method Primitive The subroutine name to call in the included exe.
return Primitive

Compile() public static method

Compile a secondary Small Basic file. Assumes that Small Basic is installed in the default location for your OS.
public static Compile ( Primitive path ) : Primitive
path Primitive A Small Basic file to compile (.sb).
return Primitive

Function() public static method

Call a Small Basic Sub as a function with one input argument. The input arguments(s) will be copied to an array called "args". The result should be put in a variable (may be an array) called "return". The variable "args" should be set to "" at the start of the program. The input parameter(s) are unchanged, while "args" and "return" are set to "" on return.
public static Function ( Primitive funcName, Primitive arg1 ) : Primitive
funcName Primitive The Small Basic Sub name.
arg1 Primitive An input value (may be an array).
return Primitive

Function2() public static method

Call a Small Basic Sub as a function with two input arguments. See Function for more details.
public static Function2 ( Primitive funcName, Primitive arg1, Primitive arg2 ) : Primitive
funcName Primitive
arg1 Primitive 1st input value (may be an array).
arg2 Primitive 2nd input value (may be an array).
return Primitive

Function3() public static method

Call a Small Basic Sub as a function with three input arguments. See Function for more details.
public static Function3 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3 ) : Primitive
funcName Primitive
arg1 Primitive 1st input value (may be an array).
arg2 Primitive 2nd input value (may be an array).
arg3 Primitive 3rd input value (may be an array).
return Primitive

Function4() public static method

Call a Small Basic Sub as a function with four input arguments. See Function for more details.
public static Function4 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3, Primitive arg4 ) : Primitive
funcName Primitive
arg1 Primitive 1st input value (may be an array).
arg2 Primitive 2nd input value (may be an array).
arg3 Primitive 3rd input value (may be an array).
arg4 Primitive 4th input value (may be an array).
return Primitive

Function5() public static method

Call a Small Basic Sub as a function with five input arguments. See Function for more details.
public static Function5 ( Primitive funcName, Primitive arg1, Primitive arg2, Primitive arg3, Primitive arg4, Primitive arg5 ) : Primitive
funcName Primitive
arg1 Primitive 1st input value (may be an array).
arg2 Primitive 2nd input value (may be an array).
arg3 Primitive 3rd input value (may be an array).
arg4 Primitive 4th input value (may be an array).
arg5 Primitive 5th input value (may be an array).
return Primitive

Include() public static method

Reference a previously compiled program to use a subroutine method from.
public static Include ( Primitive path ) : Primitive
path Primitive The full path to a secondary compiled Small Basic program to use (.exe)
return Primitive