コード例 #1
0
        /// <summary>
        /// Initializes a new instance of <see cref="RazorTemplateEngine"/>.
        /// </summary>
        /// <param name="engine">The <see cref="RazorEngine"/>.</param>
        /// <param name="project">The <see cref="RazorProject"/>.</param>
        public RazorTemplateEngine(
            RazorEngine engine,
            RazorProject project)
        {
            if (engine == null)
            {
                throw new ArgumentNullException(nameof(engine));
            }

            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            Engine   = engine;
            Project  = project;
            _options = new RazorTemplateEngineOptions();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="T:RazorTemplateEngine" />.
 /// </summary>
 /// <param name="engine">The <see cref="T:RazorEngine" />.</param>
 /// <param name="project">The <see cref="T:RazorProject" />.</param>
 public RazorTemplateEngine(RazorEngine engine, RazorProject project)
 {
     this.Engine  = engine ?? throw new ArgumentNullException("engine");
     this.Project = project ?? throw new ArgumentNullException("project");
     this.options = new RazorTemplateEngineOptions();
 }