コード例 #1
0
 /// <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;
     }
 }
コード例 #2
0
 bool Activity()
 {
     return(Threads.Count() != 0);
 }
コード例 #3
0
 public void Adds_Value_To_Dictionary()
 {
     Assert.AreEqual(0, _dictionary.Count());
     _dictionary.AddOrUpdate(1, "Test Value");
     Assert.AreEqual(1, _dictionary.Count());
 }