using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace RoboSharp.EventArgObjects { /// /// Provide a base class that includes a StartTime, EndTime and will calculate the TimeSpan in between /// public abstract class TimeSpanEventArgs : EventArgs, RoboSharp.Interfaces.ITimeSpan { private TimeSpanEventArgs() : base() { } /// /// Create New Args /// /// /// public TimeSpanEventArgs(DateTime startTime, DateTime endTime) : base() { StartTime = startTime; EndTime = endTime; TimeSpan = EndTime.Subtract(StartTime); } internal TimeSpanEventArgs(DateTime startTime, DateTime endTime, TimeSpan tSpan) : base() { StartTime = startTime; EndTime = endTime; TimeSpan = tSpan; } /// /// Local time the command started. /// public virtual DateTime StartTime { get; } /// /// Local time the command stopped. /// public virtual DateTime EndTime { get; } /// /// Length of time the process took to run /// public virtual TimeSpan TimeSpan { get; } } }