AniDBmini.AniDBAPI.cancelHashing C# (CSharp) Method

cancelHashing() public method

public cancelHashing ( ) : void
return void
        public void cancelHashing()
        {
            hasher.Cancel();
            hasher.Clear();
        }

Usage Example

        /// <summary>
        /// Removes a hash entry from the list.
        /// </summary>
        /// <param name="item">Item to remove.</param>
        /// <param name="userRemoved">True if removed by user.</param>
        private void removeRowFromHashTable(HashItem item, bool userRemoved = false)
        {
            if (isHashing && userRemoved)
            {
                totalQueueSize -= item.Size;

                if (item == hashFileList[0])
                {
                    m_aniDBAPI.cancelHashing();
                }
            }

            lock (m_hashingLock)
                hashFileList.Remove(item);

            Dispatcher.BeginInvoke(new Action(delegate
            {
                if (hashFileList.Count == 0)
                {
                    hashingStartButton.IsEnabled = hashingStopButton.IsEnabled = false;
                }
            }));
        }