Ejemplo n.º 1
0
        /// <summary>
        /// Create a new template context containing the specified merge fields.
        /// </summary>
        /// <param name="mergeFields"></param>
        /// <returns></returns>

        protected override ILavaRenderContext OnCreateRenderContext()
        {
            // Create a new DotLiquid Context.
            // Set the flag to rethrow exceptions generated by the DotLiquid framework, so they can be intercepted and handled as Lava errors.
            var dotLiquidContext = new global::DotLiquid.Context(new List <Hash>(), new Hash(), new Hash(), rethrowErrors: true);

            var context = new DotLiquidRenderContext(dotLiquidContext);

            return(context);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Renders the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="result">The result.</param>
 public override void Render(Context context, TextWriter result)
 {
     base.Render(context, result);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Determines whether the specified command is authorized.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <returns></returns>
 protected bool IsAuthorized(Context context)
 {
     return(LavaHelper.IsAuthorized(context, this.GetType().Name));
 }