FunctionCollection

Implements a list of functions.

Inherits: IFunctionCollection

Description

The FunctionCollection class allows you to implement a list of functions

Properties

Length

Gets the number of functions stored in the collection.

public virtual int Length { get; }

Instance methods

Add

Adds a new function to the collection.

public virtual void Add(IFunction function)

  • func: IFunction - array with function parameters.

Clear

Clears the collection.

public virtual void Clear()

FindByName

Finds a function in the list by it’s name.

public virtual IFunction FindByName(string name)

  • name: string - function name to be found.
  • returns: IFunction - function or null if no function was not found.

FindIndexByName

Finds a function’s index in the list by it’s name.

public virtual int FindIndexByName(string name)

  • name: string - function name to be found.
  • returns: int - function’s index in the list or -1 if nofunction was not found.

Get

Gets a function by its index.

public virtual IFunction Get(int index)

  • index: int - function’s index.
  • returns: IFunction - retrieved function.

GetAll

Gets all functions stored in the collection.

public virtual IList<IFunction> GetAll()

  • returns: IList<IFunction> - list with functions.

Remove

Removes a function by its index.

public virtual void Remove(int index)

  • index: int - index of the function to be removed.

RemoveByName

Removes a function by its name.

public virtual void RemoveByName(string name)

  • name: string - name of the function to be removed.