예제 #1
0
 internal bool GetSwoop(int index, out Swoop indicator)
 {
     lock (Swoops)
     {
         return(Swoops.TryGetValue(index, out indicator));
     }
 }
예제 #2
0
        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);
        }