private async Task SetEmailKeys() { var emailPollerUri = GetYerMawOnTheBlower.GetEnvironmentVariable(EMAIL_POLLER_APP_SETTING_KEY); var keyQueryResponse = await GetYerMawOnTheBlower.Honk(emailPollerUri, EMAIL_KEY_FUNCTION_NAME); var emailKeys = JsonConvert.DeserializeObject <EmailKeyQueryResponse>(keyQueryResponse); _mailSettings.Account = emailKeys.Account; _mailSettings.ImapConfiguration = emailKeys.ImapComfig; }
private async Task SendServiceBusMessages(IEnumerable <MessageDetail> messages) { var emailPollerUri = GetYerMawOnTheBlower.GetEnvironmentVariable(EMAIL_POLLER_APP_SETTING_KEY); var honkTheLot = new List <Task>(); foreach (var message in messages) { honkTheLot.Add(GetYerMawOnTheBlower.Honk <string>(emailPollerUri, SB_MESSAGE_FUNCTION_NAME, message)); } await Task.WhenAll(honkTheLot); }
private async Task <KeyValuePair <string, string> > GetKeyVaultValueToTuple(string keyvaultUrl, string key) { var function = await GetYerMawOnTheBlower.Honk <string>(keyvaultUrl, KEYVAULT_FUNCTION_NAME, key); return(new KeyValuePair <string, string>(key, function)); }