Пример #1
0
 public void Precompile(IPackageLog log)
 {
     nonNativePartialDescriptors().Each(vd => log.TrapErrors(() => {
         var def = vd.ToViewDefinition();
         _providerCache.GetViewEntry(def.ViewDescriptor);
         _providerCache.GetViewEntry(def.PartialDescriptor);
     }));
 }
Пример #2
0
        private ISparkViewEntry getViewEntry(bool partial)
        {
            var definition      = _resolver.Resolve(_descriptor);
            var sparkDescriptor = partial ? definition.PartialDescriptor : definition.ViewDescriptor;

            return(_provider.GetViewEntry(sparkDescriptor));
        }
        public ISparkViewEntry BuildViewEntry(object model)
        {
            var descriptor = _sparkTemplateRegistry
                             .ViewDescriptors()
                             .FirstOrDefault(x => x.ViewModel == model.GetType());

            if (descriptor == null)
            {
                return(null);
            }

            var sparkViewDescriptor = descriptor.ToSparkViewDescriptor();

            return(_viewEntryProviderCache.GetViewEntry(sparkViewDescriptor));
        }