Beispiel #1
0
 public void RemoveResponder(ResponderBase responder)
 {
     if (responder == null)
     {
         return;
     }
     if (_responders.Contains(responder))
     {
         _responders.Remove(responder);
     }
     if (_respondersByName.ContainsKey(responder.ResponderSignificantName))
     {
         _respondersByName.Remove(responder.ResponderSignificantName);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Add an IResponder implementation to this
 /// request handler
 /// </summary>
 /// <param name="responder"></param>
 public void AddResponder(ResponderBase responder)
 {
     _responders.Add(responder);
     _respondersByName.AddMissing(responder.ResponderSignificantName, responder);
     ResponderAdded?.Invoke(this, responder);
 }