Fixed async task notifications; added more comments; restored CancellationToken methods; removed useless usings
git-svn-id: file:///srv/devel/repo-conversion/nusu@330 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
fdf4442163
commit
a934fb155e
37 changed files with 11 additions and 57 deletions
|
@ -19,6 +19,7 @@ License along with this library
|
|||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace Nuclex.Support.Async {
|
||||
|
||||
|
@ -28,11 +29,9 @@ namespace Nuclex.Support.Async {
|
|||
/// <summary>Executes the action</summary>
|
||||
void Run();
|
||||
|
||||
#if false
|
||||
/// <summary>Executes the action allowing cancellation via a cancellation token</summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can cancel the action</param>
|
||||
void Run(CancellationToken cancellationToken);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ License along with this library
|
|||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace Nuclex.Support.Async {
|
||||
|
||||
|
@ -30,14 +31,12 @@ namespace Nuclex.Support.Async {
|
|||
/// <param name="option">Option or configuration to switch to</param>
|
||||
void Switch(TOptions option);
|
||||
|
||||
#if false
|
||||
/// <summary>Switches to a different option or configuration</summary>
|
||||
/// <param name="option">Option or configuration to switch to</param>
|
||||
/// <param name="cancellationToken">
|
||||
/// Cancellation token by which the switch can be cancelled
|
||||
/// </param>
|
||||
void Switch(TOptions option, CancellationToken cancellationToken);
|
||||
#endif
|
||||
|
||||
/// <summary>Current target option or configuration being switched to</summary>
|
||||
TOptions Target { get; }
|
||||
|
|
|
@ -25,14 +25,11 @@ namespace Nuclex.Support.Async {
|
|||
/// <summary>Task that runs in the background or externally</summary>
|
||||
public interface IAsyncTask {
|
||||
|
||||
/// <summary>Triggered when the process starts running</summary>
|
||||
event EventHandler Started;
|
||||
/// <summary>Triggered when the status of the task changes</summary>
|
||||
event EventHandler<AsyncStatusEventArgs> StatusChanged;
|
||||
|
||||
/// <summary>Triggered when the action finishes for any reason</summary>
|
||||
event EventHandler Finished;
|
||||
|
||||
/// <summary>Whether the action is currently running</summary>
|
||||
bool IsRunning { get; }
|
||||
/// <summary>Current status of the asynchronous task</summary>
|
||||
AsyncStatus Status { get; }
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue