public virtual void Initialize(ISparkServiceContainer container) { Settings = container.GetService<ISparkSettings>(); Engine = container.GetService<ISparkViewEngine>(); DescriptorBuilder = container.GetService<IDescriptorBuilder>(); //CacheServiceProvider = container.GetService<ICacheServiceProvider>(); }
/// <summary> /// Install the view engine from the container. Typical usage is to call CreateContainer, /// provide additinal service builder functors to override certain classes, then call this /// method. /// </summary> /// <param name="engines">Typically the ViewEngines.Engines collection</param> /// <param name="container">A service container, often created with CreateContainer</param> public static void RegisterViewEngine(ICollection<IViewEngine> engines, ISparkServiceContainer container) { engines.Add(container.GetService<IViewEngine>()); }
/// <summary> /// Installs the Spark view engine. Container passed in. /// </summary> public static void RegisterViewEngine(ISparkServiceContainer container) { ViewEngines.Engines.Add(container.GetService<IViewEngine>()); }
public virtual void Initialize(ISparkServiceContainer container) { _engine = container.GetService<ISparkViewEngine>(); _grammar = new UseMasterGrammar(_engine.Settings.Prefix); }
public virtual void Initialize(ISparkServiceContainer container) { _engine = container.GetService <ISparkViewEngine>(); _grammar = new UseMasterGrammar(_engine.Settings.Prefix); }
/// <summary> /// Installs the Spark view engine. Container passed in. /// </summary> public static void RegisterViewEngine(MvcServer server, ISparkServiceContainer container) { server.ViewEngines.Add(container.GetService<IViewEngine>()); }
public static void Install(ISparkServiceContainer services, Func<ControllerContext, string> selector) { services.AddFilter(new Filter(selector)); services.GetService<ISparkViewEngine>().ViewFolder = new Folder(services.GetService<IViewFolder>()); }
public virtual void Initialize(ISparkServiceContainer container) { _engine = container.GetService <ISparkViewEngine>(); }
public static void Install(ISparkServiceContainer services, Func <ControllerContext, string> selector) { services.AddFilter(new Filter(selector)); services.GetService <ISparkViewEngine>().ViewFolder = new Folder(services.GetService <IViewFolder>()); }
public SparkViewResolverWithServiceContainerWrapper(ISparkServiceContainerFactory sparkServiceContainerFactory) { ISparkServiceContainer container = sparkServiceContainerFactory.CreateServiceContainer(); _wrapped = new SparkViewResolver(container.GetService <ISparkViewEngine>()); }
/// <summary> /// Installs the Spark view engine. Service container passed in. /// </summary> public static void RegisterViewEngine(ISparkServiceContainer container) { ViewEngines.Engines.Add(container.GetService <IViewEngine>()); }
/// <summary> /// Install the view engine from the container. Typical usage is to call CreateContainer, /// provide additinal service builder functors to override certain classes, then call this /// method. /// </summary> /// <param name="engines">Typically the ViewEngines.Engines collection</param> /// <param name="container">A service container, often created with CreateContainer</param> public static void RegisterViewEngine(ICollection <IViewEngine> engines, ISparkServiceContainer container) { engines.Add(container.GetService <IViewEngine>()); }
public void Initialize(ISparkServiceContainer container) { _settings = container.GetService<ISparkSettings>(); Engine = container.GetService<ISparkViewEngine>(); CacheServiceProvider = container.GetService<ICacheServiceProvider>(); }
public virtual void Initialize(ISparkServiceContainer container) { _engine = container.GetService<ISparkViewEngine>(); }
public static void AddFilter(this ISparkServiceContainer target, IDescriptorFilter filter) { target.GetService <IDescriptorBuilder>().AddFilter(filter); }
public void Initialize(ISparkServiceContainer container) { Settings = container.GetService<ISparkSettings>(); SyntaxProvider = container.GetService<ISparkSyntaxProvider>(); ViewActivatorFactory = container.GetService<IViewActivatorFactory>(); LanguageFactory = container.GetService<ISparkLanguageFactory>(); ResourcePathManager = container.GetService<IResourcePathManager>(); TemplateLocator = container.GetService<ITemplateLocator>(); SetViewFolder(container.GetService<IViewFolder>()); }
/// <summary> /// Installs the Spark view engine. Container passed in. /// </summary> public static void RegisterViewEngine(MvcServer server, ISparkServiceContainer container) { server.ViewEngines.Add(container.GetService <IViewEngine>()); }