microsoft/healthcare-shared-components

Public

mirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.0.0-1.0.79

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Microsoft.Health.Core/Internal/ClockResolver.cs

22lines · modecode

1// -------------------------------------------------------------------------------------------------
2// Copyright (c) Microsoft Corporation. All rights reserved.
3// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
4// -------------------------------------------------------------------------------------------------
5
6using System;
7
8namespace Microsoft.Health.Core.Internal
9{
10 /// <summary>
11 /// Not the clock you're looking for.
12 /// Used to override the static Clock class's UtcNowFunc for use in testing.
13 /// </summary>
14 public static class ClockResolver
15 {
16 public static Func<DateTimeOffset> UtcNowFunc
17 {
18 get => Clock.UtcNowFunc;
19 set => Clock.UtcNowFunc = value;
20 }
21 }
22}