Sicherung

This commit is contained in:
Maier Stephan SI
2023-01-02 04:33:49 +01:00
parent bea46135fd
commit d01747f75a
284 changed files with 6106 additions and 65112 deletions

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Object that provides <see cref="IStatistic"/> objects whose events can be bound to report estimated RoboCommand / RoboQueue progress periodically.
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IProgressEstimator"/>
/// </remarks>
public interface IProgressEstimator : IResults
{
/// <summary>
/// Estimate of current number of directories processed while the job is still running. <br/>
/// Estimate is provided by parsing of the LogLines produces by RoboCopy.
/// </summary>
new IStatistic DirectoriesStatistic { get; }
/// <summary>
/// Estimate of current number of files processed while the job is still running. <br/>
/// Estimate is provided by parsing of the LogLines produces by RoboCopy.
/// </summary>
new IStatistic FilesStatistic { get; }
/// <summary>
/// Estimate of current number of bytes processed while the job is still running. <br/>
/// Estimate is provided by parsing of the LogLines produces by RoboCopy.
/// </summary>
new IStatistic BytesStatistic { get; }
/// <summary>
/// Parse this object's stats into a <see cref="RoboCopyExitCodes"/> enum.
/// </summary>
RoboCopyExitCodes GetExitCode();
/// <summary> Event that occurs when this IProgressEstimatorObject's IStatistic values have been updated. </summary>
event ProgressEstimator.UIUpdateEventHandler ValuesUpdated;
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Provides <see cref="IStatistic"/> objects for File, Directory, and Bytes to allow comparison between ProgressEstimator and RoboCopyResults objects
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IResults"/>
/// </remarks>
public interface IResults
{
/// <summary> Information about number of Directories Copied, Skipped, Failed, etc.</summary>
IStatistic DirectoriesStatistic { get; }
/// <summary> Information about number of Files Copied, Skipped, Failed, etc.</summary>
IStatistic FilesStatistic { get; }
/// <summary> Information about number of Bytes processed.</summary>
IStatistic BytesStatistic { get; }
/// <inheritdoc cref="RoboCopyExitStatus"/>
RoboCopyExitStatus Status { get; }
}
}

View File

@@ -0,0 +1,121 @@
using System.Threading.Tasks;
namespace RoboSharp.Interfaces
{
/// <summary>
///
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IRoboCommand"/>
/// </remarks>
public interface IRoboCommand
{
#region Properties
/// <inheritdoc cref="RoboCommand.Name"/>
string Name { get; }
/// <inheritdoc cref="RoboCommand.IsPaused"/>
bool IsPaused { get; }
/// <inheritdoc cref="RoboCommand.IsRunning"/>
bool IsRunning { get; }
/// <inheritdoc cref="RoboCommand.IsScheduled"/>
bool IsScheduled{ get; }
/// <inheritdoc cref="RoboCommand.IsCancelled"/>
bool IsCancelled { get; }
/// <inheritdoc cref="RoboCommand.StopIfDisposing"/>
bool StopIfDisposing { get; }
/// <inheritdoc cref="RoboCommand.ProgressEstimator"/>
IProgressEstimator IProgressEstimator { get; }
/// <inheritdoc cref="RoboCommand.IsPaused"/>
string CommandOptions { get; }
/// <inheritdoc cref="RoboCommand.CopyOptions"/>
CopyOptions CopyOptions { get; set; }
/// <inheritdoc cref="RoboCommand.SelectionOptions"/>
SelectionOptions SelectionOptions { get; set; }
/// <inheritdoc cref="RoboCommand.RetryOptions"/>
RetryOptions RetryOptions { get; set; }
/// <inheritdoc cref="RoboCommand.LoggingOptions"/>
LoggingOptions LoggingOptions { get; set; }
/// <inheritdoc cref="RoboCommand.JobOptions"/>
JobOptions JobOptions{ get; }
/// <inheritdoc cref="RoboCommand.Configuration"/>
RoboSharpConfiguration Configuration { get; }
#endregion Properties
#region Events
/// <inheritdoc cref="RoboCommand.OnFileProcessed"/>
event RoboCommand.FileProcessedHandler OnFileProcessed;
/// <inheritdoc cref="RoboCommand.OnCommandError"/>
event RoboCommand.CommandErrorHandler OnCommandError;
/// <inheritdoc cref="RoboCommand.OnError"/>
event RoboCommand.ErrorHandler OnError;
/// <inheritdoc cref="RoboCommand.OnCommandCompleted"/>
event RoboCommand.CommandCompletedHandler OnCommandCompleted;
/// <inheritdoc cref="RoboCommand.OnCopyProgressChanged"/>
event RoboCommand.CopyProgressHandler OnCopyProgressChanged;
/// <inheritdoc cref="RoboCommand.OnProgressEstimatorCreated"/>
event RoboCommand.ProgressUpdaterCreatedHandler OnProgressEstimatorCreated;
/// <inheritdoc cref="RoboCommand.TaskFaulted"/>
event System.UnhandledExceptionEventHandler TaskFaulted;
#endregion Events
#region Methods
/// <inheritdoc cref="RoboCommand.Pause"/>
void Pause();
/// <inheritdoc cref="RoboCommand.Resume"/>
void Resume();
/// <inheritdoc cref="RoboCommand.Start(string, string, string)"/>
Task Start(string domain = "", string username = "", string password = "");
/// <inheritdoc cref="RoboCommand.Start_ListOnly(string, string, string)"/>
Task Start_ListOnly(string domain = "", string username = "", string password = "");
/// <inheritdoc cref="RoboCommand.GetResults"/>
Results.RoboCopyResults GetResults();
/// <inheritdoc cref="RoboCommand.Stop()"/>
void Stop();
/// <inheritdoc cref="RoboCommand.Dispose()"/>
void Dispose();
#if NET45_OR_GREATER || NETSTANDARD2_0_OR_GREATER || NETCOREAPP3_1_OR_GREATER
/// <inheritdoc cref="RoboCommand.StartAsync_ListOnly(string, string, string)"/>
Task<Results.RoboCopyResults> StartAsync_ListOnly(string domain = "", string username = "", string password = "");
/// <inheritdoc cref="RoboCommand.StartAsync(string, string, string)"/>
Task<Results.RoboCopyResults> StartAsync(string domain = "", string username = "", string password = "");
#endif
#endregion Methods
}
}

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Interface for a class factory object to produce <see cref="IRoboCommand"/> objects <br/>
/// Usable by consumers to specify a factory object their library can rely on to create classes derived from the <see cref="RoboCommand"/> object. <br/>
/// </summary>
public interface IRoboCommandFactory
{
/// <summary>
/// Create a new <see cref="IRoboCommand"/> object using the parameterless constructor
/// </summary>
/// <returns>
/// new <see cref="IRoboCommand"/> object
/// </returns>
/// <inheritdoc cref="RoboCommand.RoboCommand()"/>
IRoboCommand GetRoboCommand();
/// <summary>
/// Create a new <see cref="IRoboCommand"/> with the specified source and destination
/// </summary>
/// <param name="source"><inheritdoc cref="CopyOptions.Source" path="*"/></param>
/// <param name="destination"><inheritdoc cref="CopyOptions.Destination" path="*"/></param>
/// <inheritdoc cref="RoboCommand.RoboCommand(string, string, bool)"/>
IRoboCommand GetRoboCommand(string source, string destination);
/// <inheritdoc cref="RoboCommandFactory.GetRoboCommand(string, string, CopyOptions.CopyActionFlags, SelectionOptions.SelectionFlags)"/>
IRoboCommand GetRoboCommand(string source, string destination, CopyOptions.CopyActionFlags copyActionFlags);
/// <inheritdoc cref="RoboCommandFactory.GetRoboCommand(string, string, CopyOptions.CopyActionFlags, SelectionOptions.SelectionFlags)"/>
IRoboCommand GetRoboCommand(string source, string destination, CopyOptions.CopyActionFlags copyActionFlags, SelectionOptions.SelectionFlags selectionFlags);
/*
* The constructors within the region below have been intentionally left out of the interface.
* This is because these constructors are for more advanced usage of the object, and the base interface should only enforce the
* what will most likely be the two most commonly used constructors.
*
* Should consumers require the interface to be expanded, they can produce their own interface that is derived from this one.
*/
#region
///// <summary>
///// Create a new <see cref="IRoboCommand"/> with the specified name
///// </summary>
///// <inheritdoc cref="RoboCommand.RoboCommand(string, bool)"/>
//IRoboCommand GetRoboCommand(string name, bool stopIfDisposing = true);
///// <summary>
///// Create a new <see cref="IRoboCommand"/> with the specified source and destination
///// </summary>
///// <inheritdoc cref="RoboCommand.RoboCommand(string, string, bool)"/>
//IRoboCommand GetRoboCommand(string source, string destination, bool stopIfDisposing = true);
///// <summary>
///// Create a new <see cref="IRoboCommand"/> with the specified source, destination, and name
///// </summary>
///// <inheritdoc cref="RoboCommand.RoboCommand(string, string, string, bool)"/>
//IRoboCommand GetRoboCommand(string source, string destination, string name, bool stopIfDisposing = true);
///// <inheritdoc cref="RoboCommand.RoboCommand(string, string, string, bool, RoboSharpConfiguration, CopyOptions, SelectionOptions, RetryOptions, LoggingOptions, JobOptions)"/>
//IRoboCommand GetRoboCommand(string name, string source = null, string destination = null, bool stopIfDisposing = true, RoboSharpConfiguration configuration = null, CopyOptions copyOptions = null, SelectionOptions selectionOptions = null, RetryOptions retryOptions = null, LoggingOptions loggingOptions = null, JobOptions jobOptions = null);
///// <inheritdoc cref="RoboCommand.RoboCommand(RoboCommand, string, string, bool, bool, bool, bool, bool)"/>
//IRoboCommand GetRoboCommand(RoboCommand command, string NewSource = null, string NewDestination = null, bool LinkConfiguration = true, bool LinkRetryOptions = true, bool LinkSelectionOptions = false, bool LinkLoggingOptions = false, bool LinkJobOptions = false);
#endregion
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Read-Only interface for <see cref="RoboCopyCombinedExitStatus"/>
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IRoboCopyCombinedExitStatus"/>
/// </remarks>
public interface IRoboCopyCombinedExitStatus : INotifyPropertyChanged, ICloneable
{
/// <inheritdoc cref="RoboCopyCombinedExitStatus.WasCancelled"/>
bool WasCancelled { get; }
/// <inheritdoc cref="RoboCopyCombinedExitStatus.AnyNoCopyNoError"/>
bool AnyNoCopyNoError { get; }
/// <inheritdoc cref="RoboCopyCombinedExitStatus.AnyWasCancelled"/>
bool AnyWasCancelled { get; }
/// <inheritdoc cref="RoboCopyCombinedExitStatus.AllSuccessful"/>
bool AllSuccessful { get; }
/// <inheritdoc cref="RoboCopyCombinedExitStatus.AllSuccessful_WithWarnings"/>
bool AllSuccessful_WithWarnings { get; }
}
}

View File

@@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Interface to provide Read-Only access to a <see cref="RoboCopyResultsList"/>
/// <para/>Implements: <br/>
/// <see cref="IEnumerable{T}"/> where T = <see cref="RoboCopyResults"/> <br/>
/// <see cref="ICloneable"/>
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IRoboCopyResultsList"/>
/// </remarks>
public interface IRoboCopyResultsList : IEnumerable<RoboCopyResults>, INotifyCollectionChanged
{
#region < Properties >
/// <summary>
/// Get the <see cref="RoboCopyResults"/> objects at the specified index.
/// </summary>
/// <returns></returns>
/// <exception cref="IndexOutOfRangeException"/>
RoboCopyResults this[int i] { get; }
/// <inheritdoc cref="RoboCopyResultsList.DirectoriesStatistic"/>
IStatistic DirectoriesStatistic { get; }
/// <inheritdoc cref="RoboCopyResultsList.BytesStatistic"/>
IStatistic BytesStatistic { get; }
/// <inheritdoc cref="RoboCopyResultsList.FilesStatistic"/>
IStatistic FilesStatistic { get; }
/// <inheritdoc cref="RoboCopyResultsList.SpeedStatistic"/>
ISpeedStatistic SpeedStatistic { get; }
/// <inheritdoc cref="RoboCopyResultsList.Status"/>
IRoboCopyCombinedExitStatus Status { get; }
/// <inheritdoc cref="RoboCopyResultsList.Collection"/>
IReadOnlyList<RoboCopyResults> Collection { get; }
/// <inheritdoc cref="RoboCopyResultsList.Count"/>
int Count { get; }
#endregion
#region < Methods >
/// <summary>
/// Get a snapshot of the ByteStatistics objects from this list.
/// </summary>
/// <returns>New array of the ByteStatistic objects</returns>
IStatistic[] GetByteStatistics();
/// <summary>
/// Get a snapshot of the DirectoriesStatistic objects from this list.
/// </summary>
/// <returns>New array of the DirectoriesStatistic objects</returns>
IStatistic[] GetDirectoriesStatistics();
/// <summary>
/// Get a snapshot of the FilesStatistic objects from this list.
/// </summary>
/// <returns>New array of the FilesStatistic objects</returns>
IStatistic[] GetFilesStatistics();
/// <summary>
/// Get a snapshot of the FilesStatistic objects from this list.
/// </summary>
/// <returns>New array of the FilesStatistic objects</returns>
RoboCopyExitStatus[] GetStatuses();
/// <summary>
/// Get a snapshot of the FilesStatistic objects from this list.
/// </summary>
/// <returns>New array of the FilesStatistic objects</returns>
ISpeedStatistic[] GetSpeedStatistics();
/// <summary>
/// Combine the <see cref="RoboCopyResults.RoboCopyErrors"/> into a single array of errors
/// </summary>
/// <returns>New array of the ErrorEventArgs objects</returns>
ErrorEventArgs[] GetErrors();
#endregion
}
}

View File

@@ -0,0 +1,139 @@
using RoboSharp.Interfaces;
using RoboSharp.Results;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Threading.Tasks;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Interface for RoboQueue
/// </summary>
public interface IRoboQueue : IDisposable, INotifyPropertyChanged, IEnumerable<IRoboCommand>
{
#region < Properties >
/// <inheritdoc cref="RoboQueue.AnyCancelled"/>
bool AnyCancelled { get; }
/// <inheritdoc cref="RoboQueue.AnyPaused"/>
bool AnyPaused { get; }
/// <inheritdoc cref="RoboQueue.AnyRunning"/>
bool AnyRunning { get; }
/// <inheritdoc cref="RoboQueue.Commands"/>
ReadOnlyCollection<IRoboCommand> Commands { get; }
/// <inheritdoc cref="RoboQueue.CopyOperationCompleted"/>
bool CopyOperationCompleted { get; }
/// <inheritdoc cref="RoboQueue.IsCopyOperationRunning"/>
bool IsCopyOperationRunning { get; }
/// <inheritdoc cref="RoboQueue.IsListOnlyRunning"/>
bool IsListOnlyRunning { get; }
/// <inheritdoc cref="RoboQueue.IsPaused"/>
bool IsPaused { get; }
/// <inheritdoc cref="RoboQueue.IsRunning"/>
bool IsRunning { get; }
/// <inheritdoc cref="RoboQueue.JobsComplete"/>
int JobsComplete { get; }
/// <inheritdoc cref="RoboQueue.JobsCompletedSuccessfully"/>
int JobsCompletedSuccessfully { get; }
/// <inheritdoc cref="RoboQueue.JobsCurrentlyRunning"/>
int JobsCurrentlyRunning { get; }
/// <inheritdoc cref="RoboQueue.JobsStarted"/>
int JobsStarted { get; }
/// <inheritdoc cref="RoboQueue.ListCount"/>
int ListCount { get; }
/// <inheritdoc cref="RoboQueue.ListOnlyCompleted"/>
bool ListOnlyCompleted { get; }
/// <inheritdoc cref="RoboQueue.ListResults"/>
IRoboQueueResults ListResults { get; }
/// <inheritdoc cref="RoboQueue.MaxConcurrentJobs"/>
int MaxConcurrentJobs { get; set; }
/// <inheritdoc cref="RoboQueue.Name"/>
string Name { get; }
/// <inheritdoc cref="RoboQueue.ProgressEstimator"/>
IProgressEstimator ProgressEstimator { get; }
/// <inheritdoc cref="RoboQueue.RunResults"/>
IRoboQueueResults RunResults { get; }
/// <inheritdoc cref="RoboQueue.WasCancelled"/>
bool WasCancelled { get; }
#endregion
#region < Events >
/// <inheritdoc cref="RoboQueue.OnCommandCompleted"/>
event RoboCommand.CommandCompletedHandler OnCommandCompleted;
/// <inheritdoc cref="RoboQueue.OnCommandError"/>
event RoboCommand.CommandErrorHandler OnCommandError;
/// <inheritdoc cref="RoboQueue.OnCommandStarted"/>
event RoboQueue.CommandStartedHandler OnCommandStarted;
/// <inheritdoc cref="RoboQueue.OnCopyProgressChanged"/>
event RoboCommand.CopyProgressHandler OnCopyProgressChanged;
/// <inheritdoc cref="RoboQueue.OnError"/>
event RoboCommand.ErrorHandler OnError;
/// <inheritdoc cref="RoboQueue.OnFileProcessed"/>
event RoboCommand.FileProcessedHandler OnFileProcessed;
/// <inheritdoc cref="RoboQueue.OnProgressEstimatorCreated"/>
event RoboQueue.ProgressUpdaterCreatedHandler OnProgressEstimatorCreated;
/// <inheritdoc cref="RoboQueue.RunCompleted"/>
event RoboQueue.RunCompletedHandler RunCompleted;
/// <inheritdoc cref="RoboQueue.RunResultsUpdated"/>
event RoboCopyResultsList.ResultsListUpdated RunResultsUpdated;
/// <inheritdoc cref="RoboQueue.TaskFaulted"/>
event UnhandledExceptionEventHandler TaskFaulted;
#endregion
#region < Methods >
/// <inheritdoc cref="RoboQueue.PauseAll"/>
void PauseAll();
/// <inheritdoc cref="RoboQueue.ResumeAll"/>
void ResumeAll();
/// <inheritdoc cref="RoboQueue.StartAll"/>
Task<IRoboQueueResults> StartAll(string domain = "", string username = "", string password = "");
/// <inheritdoc cref="RoboQueue.StartAll_ListOnly"/>
Task<IRoboQueueResults> StartAll_ListOnly(string domain = "", string username = "", string password = "");
/// <inheritdoc cref="RoboQueue.StopAll"/>
void StopAll();
#endregion
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Interface for the <see cref="RoboSharp.Results.RoboQueueResults"/> object. <br/>
/// Implements <see cref="IRoboCopyResultsList"/>
/// </summary>
public interface IRoboQueueResults : IRoboCopyResultsList
{
/// <summary>
/// Local time the command started.
/// </summary>
DateTime StartTime { get; }
/// <summary>
/// Local time the command stopped.
/// </summary>
DateTime EndTime { get; }
/// <summary>
/// Length of time the process took to run
/// </summary>
TimeSpan TimeSpan { get; }
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Provide Read-Only access to a SpeedStatistic
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/ISpeedStatistic"/>
/// </remarks>
public interface ISpeedStatistic : INotifyPropertyChanged, ICloneable
{
/// <summary> Average Transfer Rate in Bytes/Second </summary>
decimal BytesPerSec { get; }
/// <summary> Average Transfer Rate in MB/Minute</summary>
decimal MegaBytesPerMin { get; }
/// <inheritdoc cref="SpeedStatistic.ToString"/>
string ToString();
/// <returns>new <see cref="SpeedStatistic"/> object </returns>
/// <inheritdoc cref="SpeedStatistic.SpeedStatistic(SpeedStatistic)"/>
new SpeedStatistic Clone();
}
}

View File

@@ -0,0 +1,112 @@
using System;
using System.ComponentModel;
using RoboSharp.Results;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Provide Read-Only access to a <see cref="Statistic"/> object
/// </summary>
/// <remarks>
/// <see href="https://github.com/tjscience/RoboSharp/wiki/IStatistic"/>
/// </remarks>
public interface IStatistic : INotifyPropertyChanged, ICloneable
{
#region < Properties >
/// <summary>
/// Name of the Statistics Object
/// </summary>
string Name { get; }
/// <summary>
/// <inheritdoc cref="Statistic.StatType"/>
/// </summary>
Statistic.StatType Type { get; }
/// <summary> Total Scanned during the run</summary>
long Total { get; }
/// <summary> Total Copied </summary>
long Copied { get; }
/// <summary> Total Skipped </summary>
long Skipped { get; }
/// <summary> </summary>
long Mismatch { get; }
/// <summary> Total that failed to copy or move </summary>
long Failed { get; }
/// <summary> Total Extra that exist in the Destination (but are missing from the Source)</summary>
long Extras { get; }
/// <inheritdoc cref="Statistic.NonZeroValue"/>
bool NonZeroValue { get; }
#endregion
#region < Events >
/// <inheritdoc cref="Statistic.PropertyChanged"/>
new event PropertyChangedEventHandler PropertyChanged;
/// <summary> Occurs when the <see cref="Total"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnTotalChanged;
/// <summary> Occurs when the <see cref="Copied"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnCopiedChanged;
/// <summary> Occurs when the <see cref="Skipped"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnSkippedChanged;
/// <summary> Occurs when the <see cref="Mismatch"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnMisMatchChanged;
/// <summary> Occurs when the <see cref="Failed"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnFailedChanged;
/// <summary> Occurs when the <see cref="Extras"/> Property is updated. </summary>
event Statistic.StatChangedHandler OnExtrasChanged;
#endregion
#region < ToString Methods >
/// <inheritdoc cref="SpeedStatistic.ToString"/>
string ToString();
/// <inheritdoc cref="Statistic.ToString(bool, bool, string, bool)"/>
string ToString(bool IncludeType, bool IncludePrefix, string Delimiter, bool DelimiterAfterType = false);
/// <inheritdoc cref="Statistic.ToString_Type()"/>
string ToString_Type();
/// <inheritdoc cref="Statistic.ToString_Total(bool, bool)"/>
string ToString_Total(bool IncludeType = false, bool IncludePrefix = true);
/// <inheritdoc cref="Statistic.ToString_Copied"/>
string ToString_Copied(bool IncludeType = false, bool IncludePrefix = true);
/// <inheritdoc cref="Statistic.ToString_Extras"/>
string ToString_Extras(bool IncludeType = false, bool IncludePrefix = true);
/// <inheritdoc cref="Statistic.ToString_Failed"/>
string ToString_Failed(bool IncludeType = false, bool IncludePrefix = true);
/// <inheritdoc cref="Statistic.ToString_Mismatch"/>
string ToString_Mismatch(bool IncludeType = false, bool IncludePrefix = true);
/// <inheritdoc cref="Statistic.ToString_Skipped"/>
string ToString_Skipped(bool IncludeType = false, bool IncludePrefix = true);
#endregion
/// <returns>new <see cref="Statistic"/> object </returns>
/// <inheritdoc cref="Statistic.Statistic(Statistic)"/>
new Statistic Clone();
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RoboSharp.Interfaces
{
/// <summary>
/// Interface to normalize all the Start/End/TimeSpan properties of various objects
/// </summary>
internal interface ITimeSpan
{
/// <summary>
/// Local time the command started.
/// </summary>
DateTime StartTime { get; }
/// <summary>
/// Local time the command stopped.
/// </summary>
DateTime EndTime { get; }
/// <summary>
/// Length of time the process took to run
/// </summary>
TimeSpan TimeSpan { get; }
}
}