AcUtils
A high performance abstraction layer for AccuRev
|
Wrapper around TimeSpan so we can return our own formatted elapsed time string and still sort correctly in a grid based on the actual time span. More...
Public Member Functions | |
AcDuration (TimeSpan ts) | |
Constructor. More... | |
string | ToString (string format, IFormatProvider provider) |
The ToString implementation. More... | |
Equality comparison | |
bool | Equals (AcDuration other) |
IEquatable implementation to determine the equality of instances of type AcDuration. More... | |
override bool | Equals (object other) |
Overridden to determine equality. More... | |
override int | GetHashCode () |
Override appropriate for type AcDuration. More... | |
Static Public Member Functions | |
static implicit | operator TimeSpan (AcDuration rhs) |
User-defined conversion from AcDuration to TimeSpan. More... | |
static implicit | operator AcDuration (TimeSpan rhs) |
User-defined conversion from TimeSpan to AcDuration. More... | |
Order comparison | |
int | CompareTo (AcDuration other) |
Generic IComparable implementation (default) for comparing AcDuration objects to sort by timespan. More... | |
int IComparable. | CompareTo (object other) |
Pre-generic interface implementation for code using reflection. More... | |
Wrapper around TimeSpan so we can return our own formatted elapsed time string and still sort correctly in a grid based on the actual time span.
Definition at line 25 of file AcDuration.cs.
|
inline |
Constructor.
Definition at line 32 of file AcDuration.cs.
Referenced by AcUtils.AcDuration.CompareTo(), and AcUtils.AcDuration.operator AcDuration().
|
inline |
Generic IComparable implementation (default) for comparing AcDuration objects to sort by timespan.
other | An AcDuration object to compare with this instance. |
Definition at line 99 of file AcDuration.cs.
Referenced by AcUtils.AcSession.CompareTo(), and AcUtils.AcDuration.CompareTo().
|
inlineprivate |
Pre-generic interface implementation for code using reflection.
other | An AcDuration object to compare with this instance. |
ArgumentException | thrown if argument is not an AcDuration object. |
Definition at line 116 of file AcDuration.cs.
|
inline |
IEquatable implementation to determine the equality of instances of type AcDuration.
other | The AcDuration object being compared to this instance. |
Definition at line 61 of file AcDuration.cs.
Referenced by AcUtils.AcDuration.Equals().
|
inline |
Overridden to determine equality.
Definition at line 72 of file AcDuration.cs.
|
inline |
Override appropriate for type AcDuration.
Definition at line 84 of file AcDuration.cs.
|
inlinestatic |
User-defined conversion from TimeSpan to AcDuration.
Definition at line 48 of file AcDuration.cs.
|
inlinestatic |
User-defined conversion from AcDuration to TimeSpan.
Definition at line 40 of file AcDuration.cs.
|
inline |
The ToString implementation.
format | The format specifier to use, e.g. Console.WriteLine(session.ToString("h")); |
provider | Allow clients to format output for their own types using ICustomFormatter. |
FormatException | thrown if an invalid format string is specified. |
G
Show elapsed time in days, hours, minutes and seconds. Default when not using a format specifier. H
Hours. M
Minutes. S
Seconds. D
day or days. Definition at line 140 of file AcDuration.cs.
Referenced by AcUtils.AcStopWatch.Stop().