using System; using System.Collections.Generic; using System.Linq; using System.Text; using RoboSharp.Interfaces; using RoboSharp.Results; // Do Not change NameSpace here! -> Must be RoboSharp due to prior releases namespace RoboSharp.EventArgObjects { /// /// Event Args provided by IProgressEstimator objects to notify the UI it should refresh the stat values /// public class IProgressEstimatorUpdateEventArgs : EventArgs { /// Dummy Args with Values of 0 to perform final updates through ProgressEstimator without creating new args every time internal static IProgressEstimatorUpdateEventArgs DummyArgs { get; } = new IProgressEstimatorUpdateEventArgs(null, null, null, null); private IProgressEstimatorUpdateEventArgs() : base() { } internal IProgressEstimatorUpdateEventArgs(IProgressEstimator estimator, IStatistic ByteChange, IStatistic FileChange, IStatistic DirChange) : base() { Estimator = estimator; ValueChange_Bytes = ByteChange ?? Statistic.Default_Bytes; ValueChange_Files = FileChange ?? Statistic.Default_Files; ValueChange_Directories = DirChange ?? Statistic.Default_Dirs; } /// /// /// private IProgressEstimator Estimator { get; } /// public IStatistic BytesStatistic => Estimator?.BytesStatistic; /// public IStatistic FilesStatistic => Estimator?.FilesStatistic; /// public IStatistic DirectoriesStatistic => Estimator?.DirectoriesStatistic; /// IStatistic Object that shows how much was added to the { } object during this UI Update public IStatistic ValueChange_Bytes { get; } /// IStatistic Object that shows how much was added to the { } object during this UI Update public IStatistic ValueChange_Files { get; } /// IStatistic Object that shows how much was added to the { } object during this UI Update public IStatistic ValueChange_Directories { get; } } }