Class CollectSystemConfigurationTask
Task to collect the current system configuration and store it in the snapshot store.
Implements
Inherited Members
Namespace: Serenity.SystemConfiguration.Application.Tasks
Assembly: Serenity.SystemConfiguration.Application.dll
Syntax
public class CollectSystemConfigurationTask : ITask
Constructors
CollectSystemConfigurationTask(ISystemConfigurationProvider, ISystemConfigurationSnapshotStore)
Creates a new instance of the CollectSystemConfigurationTask.
Declaration
public CollectSystemConfigurationTask(ISystemConfigurationProvider provider, ISystemConfigurationSnapshotStore store)
Parameters
| Type | Name | Description |
|---|---|---|
| ISystemConfigurationProvider | provider | The system configuration provider to use for collecting the snapshot. |
| ISystemConfigurationSnapshotStore | store | The snapshot store to save the collected snapshot. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if any argument is null. |
Properties
Criticality
Gets the criticality level of the task.
Declaration
public TaskCriticality Criticality { get; }
Property Value
| Type | Description |
|---|---|
| TaskCriticality | The criticality level of the task. |
Id
Gets the unique identifier for the task.
Declaration
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| string | The unique identifier for the task. |
LastError
Gets the last error encountered during task execution, if any.
Declaration
public Exception LastError { get; }
Property Value
| Type | Description |
|---|---|
| Exception | The last error encountered during task execution, if any. |
Weight
Gets the weight of the task for progress reporting.
Declaration
public float Weight { get; }
Property Value
| Type | Description |
|---|---|
| float | The weight of the task for progress reporting. |
Methods
RunAsync(CancellationToken)
Executes the task to collect and store the system configuration snapshot.
Declaration
public Task RunAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token to observe while waiting for the task to complete. |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the asynchronous operation. |