Squashed 'FSI.Lib/' changes from 6aa4846..4a27cd3
4a27cd3 RoboSharp eingefügt 1b2fc1f Erweiterungsmethode für Startparameter einefügt git-subtree-dir: FSI.Lib git-subtree-split: 4a27cd377a1959dc669625473b018e42c31ef147
This commit is contained in:
49
FSI.Lib/Tools/RoboSharp/EventArgObjects/TimeSpanEventArgs.cs
Normal file
49
FSI.Lib/Tools/RoboSharp/EventArgObjects/TimeSpanEventArgs.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FSI.Lib.Tools.RoboSharp.EventArgObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a base class that includes a StartTime, EndTime and will calculate the TimeSpan in between
|
||||
/// </summary>
|
||||
public abstract class TimeSpanEventArgs : EventArgs, RoboSharp.Interfaces.ITimeSpan
|
||||
{
|
||||
private TimeSpanEventArgs() : base() { }
|
||||
|
||||
/// <summary>
|
||||
/// Create New Args
|
||||
/// </summary>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Local time the command started.
|
||||
/// </summary>
|
||||
public virtual DateTime StartTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Local time the command stopped.
|
||||
/// </summary>
|
||||
public virtual DateTime EndTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Length of time the process took to run
|
||||
/// </summary>
|
||||
public virtual TimeSpan TimeSpan { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user