Example #1
0
        /// <summary>
        /// Creates template context.
        /// </summary>
        /// <returns>An instance of a <see cref="TemplateContext"/>.</returns>
        public static TemplateContext CreateContext(this IHostEnvironment environment)
        {
            var data = environment.CreateVariableScope();
            var ctx  = new TemplateContext(data, environment);

            return(ctx);
        }