Beispiel #1
0
    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);
    }
Beispiel #2
0
 public abstract void Receive(ThoughtRequest thoughtRequest);
Beispiel #3
0
 public void Route(ThoughtRequest thoughtRequest) => thoughts.Receive(thoughtRequest);
Beispiel #4
0
 public void Send(ThoughtRequest thoughtRequest)
 {
     myInput.Route(thoughtRequest);
 }