Exemple #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing) return;
     var target = TemplateFactory;
     TemplateFactory = null;
     if (target != null)
     {
         target.Dispose();
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RazorContext"/> class.
 /// </summary>
 public RazorContext(RazorConfig config = null)
 {
     Config = (config ?? new RazorConfig().Initializer.TryInitializeFromConfig().CastTo<RazorConfig>()).AsReadonly();
     TemplateFactory = new TemplateFactory(this);
 }