Allows operations to be executed with progress information.
Inheritance Hierarchy
DedicatedThreadAccessible
DedicatedThreadService
Spotfire.Dxp.Framework.ApplicationModelProgressService
Namespace: Spotfire.Dxp.Framework.ApplicationModel
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 66.0.19802.3509 (66.0.19802.3509)
Syntax
C#
public abstract class ProgressService : DedicatedThreadService
The ProgressService type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() | BackgroundProgresses |
Gets the progress operations currently running in the background.
|
![]() ![]() | CurrentProgress | Gets the progress object associated to the executing thread to which progress
can be reported. The progress object is typically created
through a call to ExecuteWithProgress(String, String, ProgressOperation).
If no such call has been made a default progress object is returned. Any progress that is
reported to the default progress is ignored
|
Methods
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | ExecuteWithProgress |
Creates a new Progress object and executes the given
top-level operation in the context of that
progress.
|
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Remarks
This class cannot be extended through inheritance.
Examples
C#
ProgressService progressService = GetService<ProgressService>(); progressService.ExecuteWithProgress("Opening File", "Task description", delegate { // Do some work // ... ProgressService.CurrentProgress.ExecuteSubtask( "Sub task", stepCount, "Step {0} of {1}", delegate { try { // Perform sub task for (int i = 0; i < stepCount; i++) { // Do something // ... ProgressService.CurrentProgress.TryReportProgress(); ProgressService.CurrentProgress.CheckCancel(); } } catch (CanceledException) { // Handle exception } finally { // Perform Cleanup } }); // Do more work // ... }
Version Information
Supported in: 14.4, 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also