Пример #1
0
 public static void RemoveEvent(BackstageEventBase ev)
 {
     var tev = ev as TwitterEventBase;
     if (tev == null) return;
     lock (_twitterEvents.SyncRoot)
     {
         _twitterEvents.Remove(tev);
     }
 }
Пример #2
0
 public static void RegisterEvent(BackstageEventBase ev)
 {
     System.Diagnostics.Debug.WriteLine("EVENT: " + ev.Title + " - " + ev.Detail);
     EventRegistered.SafeInvoke(ev);
     var tev = ev as TwitterEventBase;
     if (tev == null) return;
     lock (_twitterEvents.SyncRoot)
     {
         _twitterEvents.Insert(0, tev);
         if (_twitterEvents.Count > TwitterEventMaxHoldCount)
             _twitterEvents.RemoveAt(_twitterEvents.Count - 1);
     }
 }