Exemplo n.º 1
0
        private async Task GetConfigurationSettingFomStorge()
        {
            CloudTable settingsTable = azureTableProvider.GetAzureTableReference(Settings.ConfigurationSettingsTableName);

            Settings.AAdAppId     = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "AAdAppId")).settingValue;
            Settings.AAdAppSecret = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "AAdAppSecret")).settingValue;
        }
        private async Task DeleteTokenHelper(string accessTokenKey, string connectorJobType)
        {
            TokenTableEntity entity = await azureTableProvider.GetEntityAsync <TokenTableEntity>(tokenTable, accessTokenKey, connectorJobType);

            if (entity == null)
            {
                return;
            }

            await azureTableProvider.DeleteEntityAsync(tokenTable, entity);
        }
 private static async Task GetConfigurationSettingFomStorge(AzureTableProvider azureTableProvider, CloudTable settingsTable)
 {
     SettingsFB.FacebookAppId       = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "FacebookAppId"))?.settingValue;
     SettingsFB.FacebookAppSecret   = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "FacebookAppSecret"))?.settingValue;
     SettingsFB.FacebookVerifyToken = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "FacebookVerifyToken"))?.settingValue;
     Settings.AAdAppId     = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "AAdAppId"))?.settingValue;
     Settings.AAdAppSecret = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "AAdAppSecret"))?.settingValue;
     Settings.AADAppUri    = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "AADAppUri"))?.settingValue;
     Settings.APPINSIGHTS_INSTRUMENTATIONKEY = (await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", "APPINSIGHTS_INSTRUMENTATIONKEY"))?.settingValue;
     if (Settings.APPINSIGHTS_INSTRUMENTATIONKEY == null)
     {
         Settings.APPINSIGHTS_INSTRUMENTATIONKEY = string.Empty;
     }
 }
 public async Task <string> ReadConfigurationSettingsFromTable(string settingName)
 {
     return((await azureTableProvider.GetEntityAsync <ConfigurationSettingsEntity>(settingsTable, "ConfigurationSetting", settingName))?.settingValue);
 }