共用方式為


RazorViewEngine 建構函式

定義

多載

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory)

初始化 RazorViewEngine 的新執行個體。

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory, DiagnosticListener)

初始化 RazorViewEngine 的新執行個體。

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProject, ILoggerFactory, DiagnosticSource)
已淘汰.

初始化 RazorViewEngine 的新執行個體。

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProjectFileSystem, ILoggerFactory, DiagnosticSource)

初始化 RazorViewEngine 的新實例

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory)

初始化 RazorViewEngine 的新執行個體。

public:
 RazorViewEngine(Microsoft::AspNetCore::Mvc::Razor::IRazorPageFactoryProvider ^ pageFactory, Microsoft::AspNetCore::Mvc::Razor::IRazorPageActivator ^ pageActivator, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::Razor::RazorViewEngineOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public RazorViewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider * Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator * System.Text.Encodings.Web.HtmlEncoder * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine
Public Sub New (pageFactory As IRazorPageFactoryProvider, pageActivator As IRazorPageActivator, htmlEncoder As HtmlEncoder, optionsAccessor As IOptions(Of RazorViewEngineOptions), loggerFactory As ILoggerFactory)

參數

pageActivator
IRazorPageActivator
htmlEncoder
HtmlEncoder
optionsAccessor
IOptions<RazorViewEngineOptions>
loggerFactory
ILoggerFactory

適用於

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory, DiagnosticListener)

來源:
RazorViewEngine.cs

初始化 RazorViewEngine 的新執行個體。

public:
 RazorViewEngine(Microsoft::AspNetCore::Mvc::Razor::IRazorPageFactoryProvider ^ pageFactory, Microsoft::AspNetCore::Mvc::Razor::IRazorPageActivator ^ pageActivator, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::Razor::RazorViewEngineOptions ^> ^ optionsAccessor, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, System::Diagnostics::DiagnosticListener ^ diagnosticListener);
public RazorViewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticListener diagnosticListener);
new Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider * Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator * System.Text.Encodings.Web.HtmlEncoder * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> * Microsoft.Extensions.Logging.ILoggerFactory * System.Diagnostics.DiagnosticListener -> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine
Public Sub New (pageFactory As IRazorPageFactoryProvider, pageActivator As IRazorPageActivator, htmlEncoder As HtmlEncoder, optionsAccessor As IOptions(Of RazorViewEngineOptions), loggerFactory As ILoggerFactory, diagnosticListener As DiagnosticListener)

參數

pageActivator
IRazorPageActivator
htmlEncoder
HtmlEncoder
optionsAccessor
IOptions<RazorViewEngineOptions>
loggerFactory
ILoggerFactory
diagnosticListener
DiagnosticListener

適用於

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProject, ILoggerFactory, DiagnosticSource)

來源:
RazorViewEngine.cs
來源:
RazorViewEngine.cs

警告

This constructor is obsolete and will be removed in a future version.

初始化 RazorViewEngine 的新執行個體。

public:
 RazorViewEngine(Microsoft::AspNetCore::Mvc::Razor::IRazorPageFactoryProvider ^ pageFactory, Microsoft::AspNetCore::Mvc::Razor::IRazorPageActivator ^ pageActivator, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::Razor::RazorViewEngineOptions ^> ^ optionsAccessor, Microsoft::AspNetCore::Razor::Language::RazorProject ^ razorProject, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, System::Diagnostics::DiagnosticSource ^ diagnosticSource);
public RazorViewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> optionsAccessor, Microsoft.AspNetCore.Razor.Language.RazorProject razorProject, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticSource diagnosticSource);
[System.Obsolete("This constructor is obsolete and will be removed in a future version.")]
public RazorViewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> optionsAccessor, Microsoft.AspNetCore.Razor.Language.RazorProject razorProject, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticSource diagnosticSource);
new Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider * Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator * System.Text.Encodings.Web.HtmlEncoder * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> * Microsoft.AspNetCore.Razor.Language.RazorProject * Microsoft.Extensions.Logging.ILoggerFactory * System.Diagnostics.DiagnosticSource -> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine
[<System.Obsolete("This constructor is obsolete and will be removed in a future version.")>]
new Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider * Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator * System.Text.Encodings.Web.HtmlEncoder * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> * Microsoft.AspNetCore.Razor.Language.RazorProject * Microsoft.Extensions.Logging.ILoggerFactory * System.Diagnostics.DiagnosticSource -> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine
Public Sub New (pageFactory As IRazorPageFactoryProvider, pageActivator As IRazorPageActivator, htmlEncoder As HtmlEncoder, optionsAccessor As IOptions(Of RazorViewEngineOptions), razorProject As RazorProject, loggerFactory As ILoggerFactory, diagnosticSource As DiagnosticSource)

參數

pageActivator
IRazorPageActivator
htmlEncoder
HtmlEncoder
optionsAccessor
IOptions<RazorViewEngineOptions>
razorProject
Microsoft.AspNetCore.Razor.Language.RazorProject
loggerFactory
ILoggerFactory
diagnosticSource
DiagnosticSource
屬性

適用於

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProjectFileSystem, ILoggerFactory, DiagnosticSource)

來源:
RazorViewEngine.cs
來源:
RazorViewEngine.cs

初始化 RazorViewEngine 的新實例

public:
 RazorViewEngine(Microsoft::AspNetCore::Mvc::Razor::IRazorPageFactoryProvider ^ pageFactory, Microsoft::AspNetCore::Mvc::Razor::IRazorPageActivator ^ pageActivator, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::Razor::RazorViewEngineOptions ^> ^ optionsAccessor, Microsoft::AspNetCore::Razor::Language::RazorProjectFileSystem ^ razorFileSystem, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, System::Diagnostics::DiagnosticSource ^ diagnosticSource);
public RazorViewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> optionsAccessor, Microsoft.AspNetCore.Razor.Language.RazorProjectFileSystem razorFileSystem, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticSource diagnosticSource);
new Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider * Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator * System.Text.Encodings.Web.HtmlEncoder * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions> * Microsoft.AspNetCore.Razor.Language.RazorProjectFileSystem * Microsoft.Extensions.Logging.ILoggerFactory * System.Diagnostics.DiagnosticSource -> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine
Public Sub New (pageFactory As IRazorPageFactoryProvider, pageActivator As IRazorPageActivator, htmlEncoder As HtmlEncoder, optionsAccessor As IOptions(Of RazorViewEngineOptions), razorFileSystem As RazorProjectFileSystem, loggerFactory As ILoggerFactory, diagnosticSource As DiagnosticSource)

參數

pageActivator
IRazorPageActivator
htmlEncoder
HtmlEncoder
optionsAccessor
IOptions<RazorViewEngineOptions>
razorFileSystem
Microsoft.AspNetCore.Razor.Language.RazorProjectFileSystem
loggerFactory
ILoggerFactory
diagnosticSource
DiagnosticSource

適用於