/// <summary> /// Adds an observable to the list /// </summary> /// <param name="observable"></param> /// <returns></returns> void AddObservable(Observerable observable) { /// Add Lock here // If the number active is at threshold, move into waiting if (Limit == active.Count()) { waiting.Enqueue(observable); } // Else Add the observable to "active" and "observables" else { string URL = observable.Update(); active[URL] = observable; } }
bool Activity() { return(Threads.Count() != 0); }
public void Adds_Value_To_Dictionary() { Assert.AreEqual(0, _dictionary.Count()); _dictionary.AddOrUpdate(1, "Test Value"); Assert.AreEqual(1, _dictionary.Count()); }