Created
July 10, 2020 09:28
-
-
Save asizikov/3528207d6fba89f70257278c68fe6ade 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; | |
using System.Threading.Tasks; | |
using DockerizedFunc.Dependency; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Extensions.Logging; | |
namespace DockerizedFunc.FunctionApp | |
{ | |
public class ConsoleWriter | |
{ | |
private readonly IAsyncGreeter _asyncGreeter; | |
public ConsoleWriter(IAsyncGreeter asyncGreeter) | |
{ | |
_asyncGreeter = asyncGreeter; | |
} | |
[FunctionName("ConsoleWriter")] | |
public async Task RunAsync( | |
[TimerTrigger("20 * * * * *")] TimerInfo myTimer, | |
ILogger log) | |
{ | |
log.LogInformation($"C# Timer trigger function executed at: {DateTime.UtcNow}"); | |
await _asyncGreeter.SayHiAsync(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment