#pragma warning disable 436 using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Core.Networks; using System; using System.Threading; #region How to use the variable store? // use "Vars" to access variables in the variable store (e.g. Vars.x = 5) // use "Vars[string]" to access variables using runtime strings (e.g. Vars["x"] = 5) // use "Vars.Contains(string)" to check if a variable exists // use "Vars.Clear()" to remove all variables // use "foreach (KeyValuePair v in Vars) { ... }" to iterate over all variables // use "Variables" to work with IEnumerable extension methods on the variable store #endregion namespace HeuristicLab.Networks.Programmable { [Item("MyProgrammableNode", "A programmable node of a network.")] public class MyProgrammableNode : ProgrammableNode.CompiledProgrammableNode { protected MyProgrammableNode(MyProgrammableNode original, Cloner cloner) : base(original, cloner) { } public MyProgrammableNode(ProgrammableNode context) : base(context) { } public override IDeepCloneable Clone(Cloner cloner) { return new MyProgrammableNode(this, cloner); } public override void Initialize() { base.Initialize(); // implement initialization here } protected override void ProcessMessage(IMessage message, IMessagePort port, CancellationToken token) { // implement processing of messages here } } }