protected override void beforeEach() { _root = AppDomain.CurrentDomain.BaseDirectory; _templateRegistry = new SparkTemplateRegistry(new[] { new Template(Path.Combine(_root, "Views", "Home", "ModelAView.spark"), _root, TemplateConstants.HostOrigin), new Template(Path.Combine(_root, "Views", "Home", "_partial1.spark"), _root, TemplateConstants.HostOrigin), new Template(Path.Combine(_root, "Views", "Home", "ModelBView.spark"), _root, TemplateConstants.HostOrigin), new Template(Path.Combine(_root, "Views", "Home", "_partial2.spark"), _root, TemplateConstants.HostOrigin), new Template(Path.Combine(_root, "Views", "Home", "ModelCView.spark"), _root, TemplateConstants.HostOrigin), new Template(Path.Combine(_root, "Views", "Home", "_partial3.spark"), _root, TemplateConstants.HostOrigin) }); var templates = _templateRegistry.ToList(); templates[0].Descriptor = new SparkDescriptor(templates[0]) { ViewModel = typeof(ModelA) }; templates[2].Descriptor = new SparkDescriptor(templates[2]) { ViewModel = typeof(ModelB) }; templates[4].Descriptor = new SparkDescriptor(templates[4]) { ViewModel = typeof(ModelC) }; Services.Inject(_templateRegistry); }
public SparkViewFacility(SparkTemplateRegistry templateRegistry, Parsings parsings) { _templateRegistry = templateRegistry; _parsings = parsings; }
public SparkViewFacility(SparkTemplateRegistry templateRegistry, Parsings parsings) { _templateRegistry = templateRegistry; _parsings = parsings; }