Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seangwright/be623bae6070ac64d99a91f3f06ab934 to your computer and use it in GitHub Desktop.
Save seangwright/be623bae6070ac64d99a91f3f06ab934 to your computer and use it in GitHub Desktop.
public class KenticoSettingConfigProvider : IKenticoSettingConfigProvider
{
private readonly ISiteContext siteContext;
public KenticoSettingConfigProvider(ISiteContext siteContext)
{
Guard.Against.Null(siteContext, nameof(siteContext));
this.siteContext = siteContext;
}
public string GetString(string key, bool global = false) =>
global
? SettingsKeyInfoProvider.GetValue(key)
: SettingsKeyInfoProvider.GetValue(key, siteContext.SiteName);
// additional methods below
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment