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
using System; | |
using System.Collections.Generic; | |
using Umbraco.Core; | |
using Vendr.Core; | |
using Vendr.Core.Api; | |
using Vendr.Core.Models; | |
public class DiscountImporter | |
{ | |
private readonly IVendrApi _vendr; |
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
using System.Collections.Generic; | |
using System.Linq; | |
using Umbraco.Core.Models.Blocks; | |
using Umbraco.Core.Models.PublishedContent; | |
public static class PublishedElementExtensions | |
{ | |
public static IPublishedElement GetElement(this IEnumerable<IPublishedElement> elements, string alias) | |
{ | |
return elements.GetElements(alias).FirstOrDefault(); |
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
Function Get-KeyInSource($sourcePath, $key) | |
{ | |
# Separate key alias from area | |
$keyParts = $key.Split("/") | |
$areaAlias = $keyParts[0] | |
$keyAlias = $keyParts[1] | |
# Add conditions to an array | |
$conditions = @($key) |
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
using System; | |
using System.Configuration; | |
using System.Linq; | |
using System.Runtime.Caching; | |
namespace CBW.Cache | |
{ | |
public class MemoryCacheHelper | |
{ | |
public object GetValue(string key) |