Library.RegisterFunction(string,Func)

Method in Library

Summary

Registers a new function that returns a value, which can be called from a Yarn program.

public void RegisterFunction<TResult>(string name, Func<TResult> implementation)

Parameters

NameDescription
string nameThe name of the function.
System.Func<TResult> implementationThe method to be invoked when the function is called.

Type Parameters

NameDescription
TResultThe return type of the function.