Beispiel #1
0
 /// <summary>
 /// 停止下载
 /// 取消当前正在下载的资源
 /// 清空整个队列
 /// </summary>
 public void StopDownload()
 {
     if (null != httpClient)
     {
         httpClient.Abort();
     }
     downloadSortSet.Clear();
 }
Beispiel #2
0
 /// <summary>
 /// 当释放时
 /// </summary>
 public void OnDestroy()
 {
     foreach (var current in destroy)
     {
         current.OnDestroy();
     }
     update.Clear();
     lateUpdate.Clear();
     destroy.Clear();
     loadSet.Clear();
 }
Beispiel #3
0
        /// <summary>
        /// 当释放时
        /// </summary>
        public void OnDestroy()
        {
            dispatcher.Trigger(MonoDriverEvents.OnBeforeDestroy);

            container.Flush();
            foreach (var current in destroy)
            {
                current.OnDestroy();
            }

            update.Clear();
            lateUpdate.Clear();
            fixedUpdate.Clear();
            onGui.Clear();
            destroy.Clear();
            loadSet.Clear();

            dispatcher.Trigger(MonoDriverEvents.OnDestroyed);
        }
Beispiel #4
0
        /// <summary>
        /// 当释放时
        /// </summary>
        public void OnDestroy()
        {
            container.Flush();

            foreach (var current in destroy)
            {
                current.OnDestroy();
            }

            update.Clear();
            lateUpdate.Clear();
            fixedUpdate.Clear();
            onGui.Clear();
            destroy.Clear();
            loadSet.Clear();
            applicationFocus.Clear();
            applicationPause.Clear();
            applicationQuit.Clear();
        }
Beispiel #5
0
        public void ClearTest()
        {
            var master = new SortSet <int, int>(0.25, 32);

            for (var i = 0; i < 65536; i++)
            {
                master.Add(i, i);
            }
            master.Clear();
            for (var i = 0; i < 65536; i++)
            {
                master.Add(i, i);
            }

            for (var i = 0; i < 65536; i++)
            {
                Assert.AreEqual(i, master.GetRank(i));
            }

            Assert.AreEqual(65536, master.Count);
        }