2009-05-27 19:55:06 +00:00
|
|
|
|
#region CPL License
|
|
|
|
|
/*
|
|
|
|
|
Nuclex Framework
|
|
|
|
|
Copyright (C) 2002-2009 Nuclex Development Labs
|
|
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the IBM Common Public License as
|
|
|
|
|
published by the IBM Corporation; either version 1.0 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
IBM Common Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the IBM Common Public
|
|
|
|
|
License along with this library
|
|
|
|
|
*/
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
using System;
|
2009-05-20 20:14:21 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
using Nuclex.Support.Tracking;
|
|
|
|
|
|
2009-05-28 19:50:30 +00:00
|
|
|
|
#if ENABLE_SERVICEMANAGER
|
|
|
|
|
|
2009-06-04 19:32:15 +00:00
|
|
|
|
namespace Nuclex.Support.Services.ProgressTracking {
|
|
|
|
|
|
2009-05-20 20:14:21 +00:00
|
|
|
|
/// <summary>Tracks the progress of running background processes</summary>
|
|
|
|
|
public class ProgressTrackingComponent :
|
2009-05-27 19:55:06 +00:00
|
|
|
|
IProgressCollectingService,
|
2009-05-20 20:14:21 +00:00
|
|
|
|
IProgressPublishingService {
|
|
|
|
|
|
|
|
|
|
/// <summary>Fired when the overall progress changes</summary>
|
|
|
|
|
public event EventHandler<ProgressReportEventArgs> ProgressChanged;
|
|
|
|
|
|
|
|
|
|
/// <summary>Initializes a new progress tracking component</summary>
|
|
|
|
|
public ProgressTrackingComponent() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Tracks the progress of the specified transaction</summary>
|
|
|
|
|
/// <param name="transaction">
|
|
|
|
|
/// Transaction whose progress will be tracked
|
|
|
|
|
/// </param>
|
|
|
|
|
/// <param name="processIdentifier">
|
|
|
|
|
/// Identifier unique to the tracked background process. Can be null.
|
|
|
|
|
/// </param>
|
|
|
|
|
public void Track(Transaction transaction, object processIdentifier) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Tracks the progress of the specified transaction</summary>
|
|
|
|
|
/// <param name="transaction">
|
|
|
|
|
/// Transaction whose progress will be tracked
|
|
|
|
|
/// </param>
|
|
|
|
|
public void Track(Transaction transaction) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Stops tracking the specified transaction</summary>
|
|
|
|
|
/// <param name="transaction">Transaction that will no longer be tracked</param>
|
|
|
|
|
public void Untrack(Transaction transaction) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>The overall progress of all tracked background processes</summary>
|
|
|
|
|
public float TotalProgress {
|
|
|
|
|
get { return 0.0f; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Currently active background processes</summary>
|
|
|
|
|
public IEnumerable<ITrackedProcess> TrackedProcesses {
|
|
|
|
|
get { return null; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2009-05-28 19:50:30 +00:00
|
|
|
|
|
2009-05-20 20:14:21 +00:00
|
|
|
|
} // namespace Nuclex.Support.Services.ProgressTracking
|
2009-06-04 19:32:15 +00:00
|
|
|
|
|
|
|
|
|
#endif // ENABLE_SERVICEMANAGER
|