ProjToolV2.BackgroundExecutorWithStatus.Cancel C# (CSharp) Méthode

Cancel() public méthode

public Cancel ( ) : void
Résultat void
        public void Cancel()
        {
            if (ActionTaskThread != null)
            {
                AnimateText = $"Cancelling current query({AnimateText}).";
                Log.WriteError(new SourceInfo(), AnimateText);
                ActionTaskThread.Abort();
            }
            TaskCancelled = true;
        }

Usage Example

Exemple #1
0
        private void PropulateServerObjects()
        {
            _backgroundExecutorWithStatus?.Cancel();

            switch (_selectedServerObject)
            {
            case ServerObjectType.Resource:
                BTN_CheckOut.Enabled = false;
                LoadResources();
                break;

            default:
                BTN_CheckOut.Enabled = true;
                LoadProjects();
                break;
            }
        }
All Usage Examples Of ProjToolV2.BackgroundExecutorWithStatus::Cancel