public static LoggingLevel ApplicationInsightsLoggingLevel(this IEnvironmentConfiguration config, bool throwException = false)
        {
            LoggingLevel loggingLevel;
            var          configLevel = config.PlatformOrConfigCache(KeyApplicationInsightsLoggingLevel);

            if (!string.IsNullOrEmpty(configLevel) && Enum.TryParse(configLevel, out loggingLevel))
            {
                return(loggingLevel);
            }

            return(LoggingLevel.Warning);
        }
 public static string ApplicationInsightsKey(this IEnvironmentConfiguration config, bool throwException = false)
 => config.PlatformOrConfigCache(KeyApplicationInsights);
示例#3
0
 public static string EventHubsConnection(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyEventHubsConnection);
示例#4
0
 public static string ServiceBusConnection(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyServiceBusConnection);
示例#5
0
 public static string LogStorageAccountName(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyLogStorageAccountName, config.StorageAccountName());
示例#6
0
 public static int?EncryptionKeySize(this IEnvironmentConfiguration config) => string.IsNullOrEmpty(config.PlatformOrConfigCache(KeyEncryptionKeySize)) ? default(int?) : config.PlatformOrConfigCacheInt(KeyEncryptionKeySize);
示例#7
0
 public static string StorageAccountAccessKey(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyStorageAccountAccessKey);
示例#8
0
 public static string KeyVaultSecretBaseUri(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyKeyVaultSecretBaseUri);
 public static string DocDBCollectionName(this IEnvironmentConfiguration config, bool throwExceptionIfNotFound = false)
 => config.PlatformOrConfigCache(KeyDocDBCollectionName, throwExceptionIfNotFound: throwExceptionIfNotFound);
 public static string DocDBAccountAccessKey(this IEnvironmentConfiguration config, bool throwExceptionIfNotFound = false)
 => config.PlatformOrConfigCache(KeyDocDBAccountAccessKey, throwExceptionIfNotFound: throwExceptionIfNotFound);
示例#11
0
 public static string AuthTokenLifeInMin(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyAuthTokenLifeInMin, "30");
示例#12
0
 public static string AuthIssuer(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyAuthIssuer);
示例#13
0
 public static string AuthAudiences(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyAuthAudiences);
示例#14
0
 public static Sha512SignatureHelper SignatureProvider(this IEnvironmentConfiguration config) => new Sha512SignatureHelper(config.PlatformOrConfigCache(KeyAuthSignature));
示例#15
0
 public static string EncryptionId(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyEncryptionId, "transport");
 public static string Client(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyClient);
示例#17
0
 public static string KeyVaultClientSecret(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyKeyVaultClientSecret);
 public static string AesTransportEncryptionKey(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyAesTransportEncryptionKey, throwExceptionIfNotFound: true);
 public static string AzureTableStorageConfigSASKey(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyAzureTableStorageConfigSASKey);
示例#20
0
 public static string RedisCacheConnection(this IEnvironmentConfiguration config, bool throwExceptionIfNotFound = false)
 => config.PlatformOrConfigCache(KeyRedisCacheConnection, throwExceptionIfNotFound: throwExceptionIfNotFound);
示例#21
0
 public static string EncryptionKey(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyEncryptionKey);
示例#22
0
 public static string DocDBCollectionName(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyDocDBCollectionName);
示例#23
0
 public static string AzureStorageAccountAccessKey(this IEnvironmentConfiguration config, bool throwExceptionIfNotFound = true)
 => config.PlatformOrConfigCache(KeyAzureStorageAccountAccessKey, throwExceptionIfNotFound: throwExceptionIfNotFound);
示例#24
0
 public static IList <string> WebLogFilterLevels(this IEnvironmentConfiguration config) => config.PlatformOrConfigCache(KeyWebLogFilterLevels, "All")?.Split(',').ToList() ?? new List <string>();