示例#1
0
        /// <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;
        }
示例#2
0
        /// <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);
        }
示例#3
0
        /// <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;
        }