Created
June 25, 2018 16:46
-
-
Save sfmskywalker/4fbbd5d5fedca82eff03df45094178dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using OrchardCore.Modules; | |
namespace MultiTenantApp.Features.TimeOfDay | |
{ | |
public class TimeOfDayMessageProvider : IMessageProvider | |
{ | |
private readonly IClock _clock; | |
public TimeOfDayMessageProvider(IClock clock) | |
{ | |
_clock = clock; | |
} | |
public Task<string> GetMessageAsync() | |
{ | |
return Task.FromResult($"The current time is: {_clock.UtcNow.ToLocalTime().TimeOfDay}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment