Removed commented out progression start events entirely in progress tracking framework, no cases found were it would have been of use

git-svn-id: file:///srv/devel/repo-conversion/nusu@46 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2007-09-05 20:09:35 +00:00
parent c230f0ce7c
commit 99312edc17
6 changed files with 0 additions and 78 deletions

View File

@ -66,10 +66,6 @@ namespace Nuclex.Support.Scheduling {
/// <summary>Invokes the delegate passed as an argument</summary>
/// <param name="state">Not used</param>
private void callMethod(object state) {
#if PROGRESSION_STARTABLE
OnAsyncStarted();
#endif
try {
Execute();
}

View File

@ -20,7 +20,6 @@ License along with this library
using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Tracking {

View File

@ -20,7 +20,6 @@ License along with this library
using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Tracking {

View File

@ -20,7 +20,6 @@ License along with this library
using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Tracking {

View File

@ -50,9 +50,6 @@ namespace Nuclex.Support.Tracking {
/// <summary>Initializes a new ended dummy progression</summary>
public EndedDummyProgression() {
#if PROGRESSION_STARTABLE
OnAsyncStarted();
#endif
OnAsyncEnded();
}
@ -71,42 +68,14 @@ namespace Nuclex.Support.Tracking {
/// <summary>will be triggered to report when progress has been achieved</summary>
public event EventHandler<ProgressUpdateEventArgs> AsyncProgressUpdated;
#if PROGRESSION_STARTABLE
/// <summary>Will be triggered when the progression has ended</summary>
public event EventHandler AsyncStarted;
#endif
/// <summary>Will be triggered when the progression has ended</summary>
public event EventHandler AsyncEnded;
#if PROGRESSION_STARTABLE
/// <summary>True when the progression has been started.</summary>
/// <remarks>
/// This is also true if the progression has been started but is already finished.
/// To find out whether the progression is running just now, use the IsRunning
/// property instead.
/// </remarks>
public bool Started {
get { return this.started; }
}
#endif
/// <summary>Whether the progression has ended already</summary>
public bool Ended {
get { return this.ended; }
}
#if PROGRESSION_STARTABLE
/// <summary>Whether the progression is currently executing.</summary>
/// <remarks>
/// This property is true when the progression is executing right at the time of
/// the call (eg. when it has been started and has not ended yet).
/// </remarks>
public bool IsRunning {
get { return (this.started && !base.Ended); }
}
#endif
/// <summary>WaitHandle that can be used to wait for the progression to end</summary>
public WaitHandle WaitHandle {
get {
@ -156,41 +125,6 @@ namespace Nuclex.Support.Tracking {
copy(this, eventArguments);
}
#if PROGRESSION_STARTABLE
/// <summary>Fires the AsyncStarted event</summary>
/// <remarks>
/// <para>
/// This event should be fired once when the implementing class begins its
/// work to indicate any observers that the process is now running.
/// </para>
/// <para>
/// Calling this method is mandatory. Care should be taken that it is called
/// exactly once and that it is called before OnAsyncEnded().
/// </para>
/// </remarks>
protected virtual void OnAsyncStarted() {
// Make sure that the progression is not started more than once.
lock(this) {
// No double lock here as it would be an implementation fault if this exception
// should be triggered. There's no sense in sacrificing normal runtime speed
// for improved performance in a case that should never occur in the first place.
if(this.started)
throw new InvalidOperationException("The operation has already been started");
this.started = true;
}
// Fire the AsyncStarted event
EventHandler copy = AsyncStarted;
if(copy != null)
copy(this, EventArgs.Empty);
}
#endif
/// <summary>Fires the AsyncEnded event</summary>
/// <remarks>
/// <para>
@ -242,10 +176,6 @@ namespace Nuclex.Support.Tracking {
/// the WaitHandle property.
/// </remarks>
private volatile ManualResetEvent doneEvent;
#if PROGRESSION_STARTABLE
/// <summary>Whether the operation has been started yet</summary>
private volatile bool started;
#endif
/// <summary>Whether the operation has completed yet</summary>
private volatile bool ended;

View File

@ -20,7 +20,6 @@ License along with this library
using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Tracking {