|
#region Using Statements
using System;
using System.Collections.Generic;
using System.Text;
#endregion Using Statements
namespace AViD
{
/// <summary>
/// The <see cref="IWorker"/> interface is used to interact with a
/// threaded operation.
/// </summary>
public interface IWorker
{
#region Public Properties
/// <summary>
/// Gets/sets whether or not the events are enabled.
/// </summary>
bool EnableEvents
{
get;
set;
}
/// <summary>
/// Gets whether or not the IWorker is working.
/// </summary>
bool IsWorking
{
get;
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Attempts to abort the current task.
/// </summary>
void Abort();
/// <summary>
/// Performs the work asynchronously.
/// </summary>
void Work();
#endregion Public Methods
#region Events/Delegates
/// <summary>
/// Handles the event at which the IWorker is done.
/// </summary>
event EventHandler Complete;
/// <summary>
/// Handles the event at which the IWorker has a progress message for an external body.
/// </summary>
event EventHandler<ProgressEventArgs> Progress;
#endregion Events/Delegates
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.
So..If you're not moving forward, you're moving backwards.