/// <summary> /// Initialises a new instance of <see cref="RazorCompiler"/>. /// </summary> /// <param name="provider">The provider used to compile templates.</param> public RazorCompiler(IRazorProvider provider) { if (provider == null) throw new ArgumentNullException("provider"); this.provider = provider; }
/// <summary> /// Sets the razor provider used for compiling templates. /// </summary> /// <param name="provider">The razor provider.</param> public static void SetRazorProvider(IRazorProvider provider) { if (provider == null) { throw new ArgumentNullException("provider"); } Compiler = new RazorCompiler(provider); }
/// <summary> /// Initialises a new instance of <see cref="RazorCompiler"/>. /// </summary> /// <param name="provider">The provider used to compile templates.</param> public RazorCompiler(IRazorProvider provider) { if (provider == null) { throw new ArgumentNullException("provider"); } this.provider = provider; }