public string GetTemplateString(ITemplatedItem item) { var finderStrategy = _finderFactory.GetStrategy(item); var templatePath = TemplatesBasePath + finderStrategy.GetTemplatePathByConvention(item) + Extension; if (!File.Exists(templatePath)) { templatePath = TemplatesBasePath + finderStrategy.GetTemplatePathDefault(item) + Extension; } if (string.IsNullOrEmpty(templatePath)) { throw new InvalidOperationException($"liquid viewnot found for {item.GetType()} handle => {item.Handle}"); } return(GetTemplateString(templatePath)); }
private static string CunstructMessage(ITemplatedItem item, ILiquidTemplateFinderStrategy strategy) { return($"invalid templated item : {item.GetType().Name} for strategy : {strategy.GetType().Name}"); }