Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.