Last change
on this file since 14777 was
12945,
checked in by jkarder, 9 years ago
|
#2205: disabled compiler warning cs0436 for all code resources
|
File size:
1.4 KB
|
Rev | Line | |
---|
[12945] | 1 | #pragma warning disable 436
|
---|
| 2 |
|
---|
[11562] | 3 | using HeuristicLab.Common;
|
---|
[11577] | 4 | using HeuristicLab.Core;
|
---|
| 5 | using HeuristicLab.Core.Networks;
|
---|
[11562] | 6 | using System;
|
---|
| 7 | using System.Threading;
|
---|
| 8 |
|
---|
[11602] | 9 | #region How to use the variable store?
|
---|
| 10 | // use "Vars" to access variables in the variable store (e.g. Vars.x = 5)
|
---|
| 11 | // use "Vars[string]" to access variables using runtime strings (e.g. Vars["x"] = 5)
|
---|
| 12 | // use "Vars.Contains(string)" to check if a variable exists
|
---|
| 13 | // use "Vars.Clear()" to remove all variables
|
---|
| 14 | // use "foreach (KeyValuePair<string, object> v in Vars) { ... }" to iterate over all variables
|
---|
| 15 | // use "Variables" to work with IEnumerable<T> extension methods on the variable store
|
---|
| 16 | #endregion
|
---|
| 17 |
|
---|
[11577] | 18 | namespace HeuristicLab.Networks.Programmable {
|
---|
[11562] | 19 | [Item("MyProgrammableNode", "A programmable node of a network.")]
|
---|
| 20 | public class MyProgrammableNode : ProgrammableNode.CompiledProgrammableNode {
|
---|
| 21 | protected MyProgrammableNode(MyProgrammableNode original, Cloner cloner) : base(original, cloner) { }
|
---|
[11563] | 22 | public MyProgrammableNode(ProgrammableNode context) : base(context) { }
|
---|
[11562] | 23 |
|
---|
| 24 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 25 | return new MyProgrammableNode(this, cloner);
|
---|
| 26 | }
|
---|
| 27 |
|
---|
[11602] | 28 | public override void Initialize() {
|
---|
| 29 | base.Initialize();
|
---|
| 30 | // implement initialization here
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | protected override void ProcessMessage(IMessage message, IMessagePort port, CancellationToken token) {
|
---|
[11562] | 34 | // implement processing of messages here
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.