private object GetModelOrder(PrinterTemplate template, T model)
 {
     return(template
            .GetFilters(GetTargetTag()).Select(x => x.Key)
            .ToList()
            .IndexOf(GetModelName(model)));
 }
        public string GetValue(PrinterTemplate template, T model)
        {
            var filters      = template.GetFilters(GetTargetTag());
            var templateName = filters.FirstOrDefault(x => FilterMatch(model, x.Key)).Value;

            if (string.IsNullOrEmpty(templateName))
            {
                var modelName = GetModelName(model);
                templateName = GetTargetTag() + (!string.IsNullOrEmpty(modelName) ? ":" + modelName : "");
            }
            var templatePart = template.GetPart(templateName);

            return(!string.IsNullOrEmpty(templatePart) ? ReplaceValues(templatePart, model, template) : "");
        }