init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Kreta.User.WebApi.Infrastructure
|
||||
{
|
||||
public class ApiKeyConfiguration : ConfigurationSection, IApiKeyConfiguration
|
||||
{
|
||||
static Lazy<ApiKeyConfiguration> instance;
|
||||
|
||||
public static ApiKeyConfiguration Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance.Value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(nameof(ApiKey), IsRequired = true)]
|
||||
public string ApiKey => (string)base[nameof(ApiKey)];
|
||||
|
||||
static ApiKeyConfiguration()
|
||||
{
|
||||
instance = new Lazy<ApiKeyConfiguration>(() => (ApiKeyConfiguration)ConfigurationManager.GetSection(Constants.ConfigurationSectionNames.ApiKeyConfiguration));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue