internal bool GetSwoop(int index, out Swoop indicator) { lock (Swoops) { return(Swoops.TryGetValue(index, out indicator)); } }
internal int AddSwoop(Swoop indicator) { var index = 0; lock (Swoops) { // get a new counter index = System.Threading.Interlocked.Increment(ref SwoopCount); // add a new swoop Swoops.Add(index, indicator); } // force a refresh IsDirty = true; Refresh(); return(index); }