88390bc38d
git-svn-id: file:///srv/devel/repo-conversion/nusu@14 d2e56fa2-650e-0410-a79f-9358c0239efd
24 lines
595 B
C#
24 lines
595 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Nuclex.Support.Tracking {
|
|
|
|
/// <summary>Base class for observable operations running in the background</summary>
|
|
public abstract class Operation : Progression {
|
|
|
|
/// <summary>Executes the operation</summary>
|
|
public abstract void Start();
|
|
|
|
/// <summary>
|
|
/// Executes the operation synchronously, blocking the calling thread
|
|
/// </summary>
|
|
public virtual void Execute() {
|
|
Start();
|
|
WaitHandle.WaitOne();
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace Nuclex.Support.Tracking
|