public BeerTree(SwitchNode start) { this.start = start; this.start.switchObject.state = StateFactory.Create(2); nodes = new List <Node>(); nodes.Add(start); }
public void SetNodeState(string nodeId, int status) { ((SwitchNode)nodes.FirstOrDefault (n => n.nodeId.Equals(nodeId))).switchObject.state = StateFactory.Create(status); }