private static StationBody createStationBody(String flowID, String name) { var emitter = new Dictionary <Loko.Station.EventType, Loko.Station.EventListener>(); emitter[EventType.Signaled] = delegate { }; emitter[EventType.Linked] = delegate { }; emitter[EventType.Blocked] = delegate { }; emitter[EventType.Closed] = delegate { }; var body = new StationBody(new Station(flowID, name, emitter), emitter); return(body); }
public static Boolean TryGet(String flowID, String name, out StationBody body) { body = null; StationCollection stations; if (!flows.TryGetValue(flowID, out stations)) { return(false); } if (!stations.TryGetValue(name, out body)) { return(false); } return(true); }
public static Boolean TryGet(Metro.Api.Station station, out StationBody body) => TryGet(station.Id, station.Name, out body);