Created
April 27, 2019 22:20
-
-
Save seangwright/be623bae6070ac64d99a91f3f06ab934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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