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));
        }
예제 #2
0
 private IEnumerable <SparkDescriptor> nonNativePartialDescriptors()
 {
     return(_templates.ViewDescriptors().Where(vd => !vd.Template.IsPartial()));
 }