mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01:00
18 lines
428 B
C#
18 lines
428 B
C#
|
using Microsoft.Extensions.Configuration;
|
|||
|
|
|||
|
namespace Bit.Infrastructure.IntegrationTest;
|
|||
|
|
|||
|
public static class ConfigurationExtensions
|
|||
|
{
|
|||
|
public static bool TryGetConnectionString(this IConfiguration config, string key, out string connectionString)
|
|||
|
{
|
|||
|
connectionString = config[key];
|
|||
|
if (string.IsNullOrEmpty(connectionString))
|
|||
|
{
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
return true;
|
|||
|
}
|
|||
|
}
|