This is preliminary documentation and is subject to change.

DateTimeProviderSetMockDateTime Method

Sets the mock date time. This substitutes delivering the current date time from the system. Use for testing and verification.

Definition

Namespace: MoreDateTime
Assembly: MoreDateTime (in MoreDateTime.dll) Version: 1.3.0
C#
public static void SetMockDateTime(
	DateTime? dtNow,
	DateTime? dtUtc = null
)

Parameters

dtNow  NullableDateTime
The fixed DateTime for the Now property
dtUtc  NullableDateTime  (Optional)
The fixed DateTime for the UtcNow property, leave null to use dtNow value

See Also