public override void Receive(ThoughtRequest thoughtRequest) { Topic.Stage requestStage = thoughtRequest.MyStage; string topic = thoughtRequest.Topic; if (!thoughts.ContainsKey(topic)) { return; } if (!thoughts[topic].ContainsKey(requestStage)) { return; } if (thoughts[topic][requestStage].Count <= 0) { return; } ThoughtResponse thoughtResponse = new ThoughtResponse(new HashSet <Thought>(thoughts[topic][requestStage])); thoughts[topic][requestStage].Clear(); Send(thoughtResponse); }
public abstract void Receive(ThoughtRequest thoughtRequest);
public void Route(ThoughtRequest thoughtRequest) => thoughts.Receive(thoughtRequest);
public void Send(ThoughtRequest thoughtRequest) { myInput.Route(thoughtRequest); }