コード例 #1
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);
        }