Esempio n. 1
0
        protected override ITemplate ResolveLayout(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(null);
            }
            var layout = _templateContext.Resolve(name, Culture);

            if (layout == null)
            {
                throw new InvalidOperationException("Layout template was not found.");
            }
            return(layout);
        }
Esempio n. 2
0
 protected override ITemplate ResolveLayout(string name)
 {
     return(string.IsNullOrEmpty(name)
         ? null
         : _templateContext.Resolve(name, Culture));
 }