Ejemplo n.º 1
0
        public static async Task <string> GetTermsAndConditions(this KenticoClient kenticoClient_)
        {
            var content = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>("elements.contentid", "content-terms-and-conditions")
            };

            try
            {
                JObject result = await kenticoClient_.Get("items", content);

                JArray items                 = (JArray)result["items"];
                JToken privacyPolicy         = items[0];
                JToken privacyPolicyElements = privacyPolicy["elements"];

                return(privacyPolicyElements["body"]["value"].Value <string>());
            }
            catch
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
 public PrivacyModel(ILogger <PrivacyModel> logger, KenticoClient kenticoClient)
 {
     _logger        = logger;
     _kenticoClient = kenticoClient;
 }
Ejemplo n.º 3
0
 public WebsiteController(IOptions <KenticoOptions> optionsAccessor, KenticoClient kenticoClient)
 {
     _options       = optionsAccessor.Value ?? new KenticoOptions();
     _kenticoClient = kenticoClient;
 }