FunctionType

Class in Yarn

Inherits from System.Object

Summary

A type that represents a function.

public class FunctionType : IType, IEquatable<IType>

Remarks

Functions have parameters and a return type, and can be called from script. Instances of this type are created when the host application registers new functions (such as through using the RegisterFunction(string,Delegate) methods or similar.)

Constructors

NameDescription
FunctionType(IType,IType[])Initialises a new instances of the FunctionType class.

Methods

NameDescription
Equals(IType)
GetParameterAt(int)Gets the type of the parameter at the given index.
ToString()

Properties

NameDescription
DescriptionGets a more verbose description of this type.
NameGets the name of this type.
ParametersGets the list of the parameter types that this function is called with.
ParentGets the parent of this type.
ReturnTypeGets the type of value that this function returns.
TypeMembersGets the collection of type information for this type’s type members.
VariadicParameterTypeGets the type of value that this type of function accepts as a variadic parameter.