/// <summary> /// This adds any Observer classes which are used by ALL MonoSubjects. /// </summary> private void AddConstantObservers() { if (thisObserver != null) { return; } thisObserver = new MonoObserver(helper); AddObserver(thisObserver); }
/// <summary> /// Removes a MonoObserver from the subscriber list /// </summary> /// <param name="obs">The observer to be removed from the subscriber /// list</param> public void unsubscribe(MonoObserver obs) { subscribers.Remove(obs); }
/// <summary> /// Adds a MonoObserver to the subscriber list and notifies it of the /// current state /// </summary> /// <param name="obs">The observer to be added to the subscriber /// list</param> public void subscribe(MonoObserver obs) { obs.receiveUpdate(theFSM.getState()); subscribers.Add(obs); }