public static StatusHandle GetNewStatusHandle() { var handle = new StatusHandle(); StatusDictionary.TryAdd(handle, handle); StatusText = $"Number of active jobs: {StatusDictionary.Count}"; return(handle); }
protected void DisposeHandle(StatusHandle handle) { StatusDictionary.TryRemove(handle, out _); StatusText = StatusDictionary.Count > 0 ? $"Number of active jobs: {StatusDictionary.Count}" : ""; }