public Codelet(string name, double urgency, Codelet parent, Coderack coderack, Workspace workspace, Slipnet slipnet) { if (urgency < 0 || urgency > 100) { // throw new ArgumentOutOfRangeException("Urgency for new codelet invalid"); } this.name = name; this.rawUrgency = urgency; this.parent = parent; this.coderack = coderack; this.workspace = workspace; this.slipnet = slipnet; if (parent == null) { generation = 0; } else { generation = parent.generation + 1; } }
/// <summary> /// Use this constructer to tell the codelet which element to examine. /// Otherwise, it picks one randomly. /// </summary> /// <param name="urgency"></param> /// <param name="parent"></param> /// <param name="coderack"></param> /// <param name="workspace"></param> /// <param name="slipnet"></param> /// <param name="notes"></param> public FormLabelAssignerCodelet(int urgency, Codelet parent, Coderack coderack, Workspace workspace, Slipnet slipnet, GroupElement e) : base("Form Label Assigner", urgency, parent, coderack, workspace, slipnet) { this.e = e; }