Exemple #1
0
        internal static RazorTemplateState CreateTemplateState(this IRazorEngineService engine, RazorTemplateKey key, RazorTemplateSource source)
        {
            engine.AddTemplate(key, source);

            return(new RazorTemplateState(engine, key, source));
        }
 /// <summary>
 /// Create a new instance.
 /// </summary>
 /// <param name="engine">The template engine.</param>
 /// <param name="key">The template key.</param>
 /// <param name="source">The template source.</param>
 public RazorTemplateState(IRazorEngineService engine, RazorTemplateKey key, RazorTemplateSource source)
 {
     Engine = engine;
     Key    = key;
     Source = source;
 }