private ILavaService GetService(Type serviceType, object configuration) { var key = LavaUtilityHelper.GetContextKeyFromType(serviceType); var service = this.GetInternalField(key); return(service as ILavaService); }
/// <summary> /// Initializes a new template context. /// </summary> /// <returns></returns> protected void InitializeRenderContext(ILavaRenderContext context, IEnumerable <string> enabledCommands = null) { if (context == null) { return; } if (enabledCommands != null) { context.SetEnabledCommands(enabledCommands); } // Set a reference to the current Lava Engine. context.SetInternalField(LavaUtilityHelper.GetContextKeyFromType(typeof(ILavaEngine)), this); }