Microsoft.Extensions.TimeProvider.Testing
Various diagnostic IDs reported by this repo.
When adding a new diagnostic ID, add a corresponding suppression to the root Directory.Build.targets file,
and add a documentation entry to docs/list-of-diagnostics.md.
Experiments supported by this repo.
Defines static methods used to throw exceptions.
The main purpose is to reduce code size, improve performance, and standardize exception
messages.
Throws an if the specified argument is .
Argument type to be checked for .
Object to be checked for .
The name of the parameter being checked.
The original value of .
Throws an if the specified argument is ,
or if the specified member is .
Argument type to be checked for .
Member type to be checked for .
Argument to be checked for .
Object member to be checked for .
The name of the parameter being checked.
The name of the member.
The original value of .
Throws.IfNullOrMemberNull(myObject, myObject?.MyProperty)
Throws an if the specified member is .
Argument type.
Member type to be checked for .
Argument to which member belongs.
Object member to be checked for .
The name of the parameter being checked.
The name of the member.
The original value of .
Throws.IfMemberNull(myObject, myObject.MyProperty)
Throws either an or an
if the specified string is or whitespace respectively.
String to be checked for or whitespace.
The name of the parameter being checked.
The original value of .
Throws an if the string is ,
or if it is empty.
String to be checked for or empty.
The name of the parameter being checked.
The original value of .
Throws an if the argument's buffer size is less than the required buffer size.
The actual buffer size.
The required buffer size.
The name of the parameter to be checked.
Throws an if the enum value is not valid.
The argument to evaluate.
The name of the parameter being checked.
The type of the enumeration.
The original value of .
Throws an if the collection is ,
or if it is empty.
The collection to evaluate.
The name of the parameter being checked.
The type of objects in the collection.
The original value of .
Throws an .
The name of the parameter that caused the exception.
Throws an .
The name of the parameter that caused the exception.
A message that describes the error.
Throws an .
The name of the parameter that caused the exception.
Throws an .
The name of the parameter that caused the exception.
A message that describes the error.
Throws an .
The name of the parameter that caused the exception.
The value of the argument that caused this exception.
A message that describes the error.
Throws an .
The name of the parameter that caused the exception.
A message that describes the error.
Throws an .
The name of the parameter that caused the exception.
A message that describes the error.
The exception that is the cause of the current exception.
If the is not a , the current exception is raised in a catch
block that handles the inner exception.
Throws an .
A message that describes the error.
Throws an .
A message that describes the error.
The exception that is the cause of the current exception.
Throws an if the specified number is less than min.
Number to be expected being less than min.
The number that must be less than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater than max.
Number to be expected being greater than max.
The number that must be greater than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less or equal than min.
Number to be expected being less or equal than min.
The number that must be less or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater or equal than max.
Number to be expected being greater or equal than max.
The number that must be greater or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is not in the specified range.
Number to be expected being greater or equal than max.
The lower bound of the allowed range of argument values.
The upper bound of the allowed range of argument values.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is equal to 0.
Number to be expected being not equal to zero.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less than min.
Number to be expected being less than min.
The number that must be less than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater than max.
Number to be expected being greater than max.
The number that must be greater than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less or equal than min.
Number to be expected being less or equal than min.
The number that must be less or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater or equal than max.
Number to be expected being greater or equal than max.
The number that must be greater or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is not in the specified range.
Number to be expected being greater or equal than max.
The lower bound of the allowed range of argument values.
The upper bound of the allowed range of argument values.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is equal to 0.
Number to be expected being not equal to zero.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less than min.
Number to be expected being less than min.
The number that must be less than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater than max.
Number to be expected being greater than max.
The number that must be greater than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less or equal than min.
Number to be expected being less or equal than min.
The number that must be less or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater or equal than max.
Number to be expected being greater or equal than max.
The number that must be greater or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is not in the specified range.
Number to be expected being greater or equal than max.
The lower bound of the allowed range of argument values.
The upper bound of the allowed range of argument values.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is equal to 0.
Number to be expected being not equal to zero.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less than min.
Number to be expected being less than min.
The number that must be less than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater than max.
Number to be expected being greater than max.
The number that must be greater than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less or equal than min.
Number to be expected being less or equal than min.
The number that must be less or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater or equal than max.
Number to be expected being greater or equal than max.
The number that must be greater or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is not in the specified range.
Number to be expected being greater or equal than max.
The lower bound of the allowed range of argument values.
The upper bound of the allowed range of argument values.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is equal to 0.
Number to be expected being not equal to zero.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less than min.
Number to be expected being less than min.
The number that must be less than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater than max.
Number to be expected being greater than max.
The number that must be greater than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is less or equal than min.
Number to be expected being less or equal than min.
The number that must be less or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is greater or equal than max.
Number to be expected being greater or equal than max.
The number that must be greater or equal than the argument.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is not in the specified range.
Number to be expected being greater or equal than max.
The lower bound of the allowed range of argument values.
The upper bound of the allowed range of argument values.
The name of the parameter being checked.
The original value of .
Throws an if the specified number is equal to 0.
Number to be expected being not equal to zero.
The name of the parameter being checked.
The original value of .
Represents a synthetic time provider that can be used to enable deterministic behavior in tests.
Initializes a new instance of the class.
This creates a provider whose time is initially set to midnight January 1st 2000.
The provider is set to not automatically advance time each time it is read.
Initializes a new instance of the class.
The initial time and date reported by the provider.
The provider is set to not automatically advance time each time it is read.
Gets the starting date and time for this provider.
Gets or sets the amount of time by which time advances whenever the clock is read.
This defaults to .
The time value is less than .
Advances the date and time in the UTC time zone.
The date and time in the UTC time zone.
The supplied time value is before the current time.
This method simply advances time. If the time is set forward beyond the
trigger point of any outstanding timers, those timers will immediately trigger.
This is unlike the method, which has no impact
on timers.
Advances time by a specific amount.
The amount of time to advance the clock by.
Advancing time affects the timers created from this provider, and all other operations that are directly or
indirectly using this provider as a time source. Whereas when using , time
marches forward automatically in hardware, for the fake time provider the application is responsible for
doing this explicitly by calling this method.
The time value is less than .
Sets the date and time in the UTC time zone.
The date and time in the UTC time zone.
This method updates the current time, and has no impact on outstanding
timers. This is similar to what happens in a real system when the system's
time is changed.
Sets the local time zone.
The local time zone.
Gets the amount by which the value from increments per second.
This is fixed to the value of .
Returns a string representation this provider's idea of current time.
A string representing the provider's current time.