Functions can be used to carry out tasks that should be performed on a one time basis. Functions are normally started manually by a user from the administrative UI.

Functions should inherit from the Mindroute.Core.Functions.Function class.


using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using Mindroute.Core.Functions;
using Mindroute.Core.Model;
namespace MyProject.Lemoon.Functions { [Serializable] [Render(Name = "Example function", Description = "An example function.")] public class Example : Function { public override FunctionResult Execute() { var result = new FunctionResult(); try { // tasks to perform when the function executes. } catch (Exception ex) { result.Error = true; result.Message = ex.Message; } return result; } } }

Example 1: An example of a function.

Make sure you override the Execute method.