Skip to content

Instantly share code, notes, and snippets.

@sfmskywalker
Created June 25, 2018 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfmskywalker/4fbbd5d5fedca82eff03df45094178dd to your computer and use it in GitHub Desktop.
Save sfmskywalker/4fbbd5d5fedca82eff03df45094178dd to your computer and use it in GitHub Desktop.
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