public string Execute(string codeFileWithExtension, IContent content, IDictionary <string, object> tokens = null)
        {
            string localFile = _razorService.CalculateFallbackTenantCodePosition("Code", codeFileWithExtension);
            var    model     = new RazorModelContext {
                OrchardServices = _orchardServices,
                ContentItem     = content,
                Tokens          = tokens ?? new Dictionary <string, object>(),
                T = T
            };

            //           RazorTemplateManager rt = new RazorTemplateManager();
            return(_razorTemplateManager.RunFile(localFile, model));
        }
        private string ValidateMessage(ContentItem ci, string postfix)
        {
            string myfile = _razorService.CalculateFallbackTenantCodePosition("Validation", ci.ContentType + postfix + ".cshtml");
            var    model  = new RazorModelContext {
                OrchardServices = _orchardServices,
                ContentItem     = ci,
                Tokens          = new Dictionary <string, object>(),
                T = T
            };
            string result     = _razorTemplateManager.RunFile(myfile, model);
            string resultnobr = result.Replace("\r\n", "").Replace(" ", "");

            if (!string.IsNullOrEmpty(resultnobr))
            {
                return(result);
            }
            return(null);
        }