C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Utilities used to format types and properties in a manner suitable to output in error messages, to excel, etc. More...
Static Public Member Functions | |
static bool | AlmostEquals (this DateTime dt1, DateTime dt2, TimeSpan? tolerance=null) |
Determines whether two dates are equal within the supported precision. | |
static bool | AlmostEquals (this double d1, double d2, double tolerance=1E-14) |
Determines whether two doubles are equivalent within the specified tolerance. | |
static bool | IsIntegerType (this Type t) |
Determines whether a property is an integer type. | |
static bool | IsNumeric (this Type t) |
Determines whether a property is numeric. | |
static string | NiceTypeName (this Type t) |
Produces a human readable string representation of the provided type name, with special consideration for generics. (Source: https://stackoverflow.com/a/2448918/529618 ) | |
Utilities used to format types and properties in a manner suitable to output in error messages, to excel, etc.
Definition at line 8 of file TypeExtensionMethods.cs.
|
inlinestatic |
Determines whether two dates are equal within the supported precision.
Analyze Re only supports a precision of up to 3 millisecond decimal places, so this is the default tolerance.
dt1 | The first DateTime. |
dt2 | The second DateTime. |
tolerance | The allowed difference before the dates are considered not equal. (Default 0.001 milliseconds) |
Definition at line 82 of file TypeExtensionMethods.cs.
|
inlinestatic |
Determines whether two doubles are equivalent within the specified tolerance.
d1 | The expected value of 'actual' |
d2 | The value to compare to 'expected' |
tolerance | (Default 1E-14) The relative (ratio) tolerance for the equivalency test. Essentially the number of significant digits that should be equal between the two doubles. |
Definition at line 67 of file TypeExtensionMethods.cs.
|
inlinestatic |
Determines whether a property is an integer type.
t | The type to check. |
Definition at line 40 of file TypeExtensionMethods.cs.
|
inlinestatic |
Determines whether a property is numeric.
t | The type to check. |
Definition at line 56 of file TypeExtensionMethods.cs.
|
inlinestatic |
Produces a human readable string representation of the provided type name, with special consideration for generics. (Source: https://stackoverflow.com/a/2448918/529618 )
Definition at line 12 of file TypeExtensionMethods.cs.