Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2017 14:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Know Your Cloud Resource Costs on Azure
namespace CostMonitoring.Functions
public static class CostMonitoringTimerTrigger
public static async void Run(TimerInfo myTimer, TraceWriter log)
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
// Defines all dependencies to be injected.
// Aggregates all usage data.
var aggregator = new CostAggregationService(...);
await aggregator.ProcessAsync(dateStart, dateEnd).ConfigureAwait(false);
// Sends alerts/warnings to applied users.
var reminder = new CostReminderService(...);
await reminder.ProcessAsync(dateStart, dateEnd, options.RunEntirePeriod, ...).ConfigureAwait(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment