public bool RemoveBehaviour(string abbreviatedName) { lock (Behaviours) { IBehaviour behaviour; if (!Behaviours.TryGetValue(abbreviatedName, out behaviour)) { return(false); } behaviour.Close(); Behaviours.Remove(abbreviatedName); return(true); } }
public bool TryGetBehaviour(string abbreviatedName, out IBehaviour behaviour) { lock (Behaviours) return(Behaviours.TryGetValue(abbreviatedName, out behaviour)); }