using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace csmic { /// Coded function factory. /// /// This class generates new coded functions dynamically. /// public static class CodedFunctionFactory { /// Creates a new ICodedFunction interface object that implements the dynamic method described. /// Name of the function. /// Number of expected arguments. /// The method body. /// An ICodedFunction interface object. public static ICodedFunction Create(string functionName, int numExpectedArguments, Func methodBody) { return new GenericCodedFunction(functionName, numExpectedArguments, methodBody); } } }