IMvcBuilder IMvcBuilder IMvcBuilder Interface

Definition

An interface for configuring MVC services.

public interface IMvcBuilder
type IMvcBuilder = interface
Public Interface IMvcBuilder
Derived

Properties

PartManager PartManager PartManager

Gets the ApplicationPartManager where ApplicationParts are configured.

Services Services Services

Gets the IServiceCollection where MVC services are configured.

Extension Methods

AddApplicationPart(IMvcBuilder, Assembly) AddApplicationPart(IMvcBuilder, Assembly) AddApplicationPart(IMvcBuilder, Assembly)

Adds an ApplicationPart to the list of ApplicationParts on the PartManager.

AddControllersAsServices(IMvcBuilder) AddControllersAsServices(IMvcBuilder) AddControllersAsServices(IMvcBuilder)

Registers discovered controllers as services in the IServiceCollection.

AddFormatterMappings(IMvcBuilder, Action<FormatterMappings>) AddFormatterMappings(IMvcBuilder, Action<FormatterMappings>) AddFormatterMappings(IMvcBuilder, Action<FormatterMappings>)
AddMvcOptions(IMvcBuilder, Action<MvcOptions>) AddMvcOptions(IMvcBuilder, Action<MvcOptions>) AddMvcOptions(IMvcBuilder, Action<MvcOptions>)

Registers an action to configure MvcOptions.

ConfigureApiBehaviorOptions(IMvcBuilder, Action<ApiBehaviorOptions>) ConfigureApiBehaviorOptions(IMvcBuilder, Action<ApiBehaviorOptions>) ConfigureApiBehaviorOptions(IMvcBuilder, Action<ApiBehaviorOptions>)

Configures ApiBehaviorOptions.

ConfigureApplicationPartManager(IMvcBuilder, Action<ApplicationPartManager>) ConfigureApplicationPartManager(IMvcBuilder, Action<ApplicationPartManager>) ConfigureApplicationPartManager(IMvcBuilder, Action<ApplicationPartManager>)

Configures the ApplicationPartManager of the PartManager using the given Action<T>.

SetCompatibilityVersion(IMvcBuilder, CompatibilityVersion) SetCompatibilityVersion(IMvcBuilder, CompatibilityVersion) SetCompatibilityVersion(IMvcBuilder, CompatibilityVersion)

Sets the CompatibilityVersion for ASP.NET Core MVC for the application.

AddDataAnnotationsLocalization(IMvcBuilder) AddDataAnnotationsLocalization(IMvcBuilder) AddDataAnnotationsLocalization(IMvcBuilder)

Adds MVC data annotations localization to the application.

AddDataAnnotationsLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>) AddDataAnnotationsLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>) AddDataAnnotationsLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>)

Adds MVC data annotations localization to the application.

AddJsonOptions(IMvcBuilder, Action<MvcJsonOptions>) AddJsonOptions(IMvcBuilder, Action<MvcJsonOptions>) AddJsonOptions(IMvcBuilder, Action<MvcJsonOptions>)

Adds configuration of MvcJsonOptions for the application.

AddMvcLocalization(IMvcBuilder) AddMvcLocalization(IMvcBuilder) AddMvcLocalization(IMvcBuilder)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)

Adds MVC view and data annotations localization services to the application.

AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>) AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>)

Adds MVC view and data annotations localization services to the application.

AddViewLocalization(IMvcBuilder) AddViewLocalization(IMvcBuilder) AddViewLocalization(IMvcBuilder)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>) AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>) AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>) AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>) AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddRazorOptions(IMvcBuilder, Action<RazorViewEngineOptions>) AddRazorOptions(IMvcBuilder, Action<RazorViewEngineOptions>) AddRazorOptions(IMvcBuilder, Action<RazorViewEngineOptions>)

Configures a set of RazorViewEngineOptions for the application.

AddTagHelpersAsServices(IMvcBuilder) AddTagHelpersAsServices(IMvcBuilder) AddTagHelpersAsServices(IMvcBuilder)

Registers tag helpers as services and replaces the existing ITagHelperActivator with an ServiceBasedTagHelperActivator.

InitializeTagHelper<TTagHelper>(IMvcBuilder, Action<TTagHelper,ViewContext>) InitializeTagHelper<TTagHelper>(IMvcBuilder, Action<TTagHelper,ViewContext>) InitializeTagHelper<TTagHelper>(IMvcBuilder, Action<TTagHelper,ViewContext>)

Adds an initialization callback for a given TTagHelper.

AddRazorPagesOptions(IMvcBuilder, Action<RazorPagesOptions>) AddRazorPagesOptions(IMvcBuilder, Action<RazorPagesOptions>) AddRazorPagesOptions(IMvcBuilder, Action<RazorPagesOptions>)

Configures a set of RazorViewEngineOptions for the application.

WithRazorPagesAtContentRoot(IMvcBuilder) WithRazorPagesAtContentRoot(IMvcBuilder) WithRazorPagesAtContentRoot(IMvcBuilder)

Configures Razor Pages to be rooted at the content root (ContentRootPath).

WithRazorPagesRoot(IMvcBuilder, String) WithRazorPagesRoot(IMvcBuilder, String) WithRazorPagesRoot(IMvcBuilder, String)

Configures Razor Pages to use the specified rootDirectory.

AddCookieTempDataProvider(IMvcBuilder) AddCookieTempDataProvider(IMvcBuilder) AddCookieTempDataProvider(IMvcBuilder)

Registers CookieTempDataProvider as the default ITempDataProvider in the IServiceCollection.

AddCookieTempDataProvider(IMvcBuilder, Action<CookieTempDataProviderOptions>) AddCookieTempDataProvider(IMvcBuilder, Action<CookieTempDataProviderOptions>) AddCookieTempDataProvider(IMvcBuilder, Action<CookieTempDataProviderOptions>)

Registers CookieTempDataProvider as the default ITempDataProvider in the IServiceCollection.

AddSessionStateTempDataProvider(IMvcBuilder) AddSessionStateTempDataProvider(IMvcBuilder) AddSessionStateTempDataProvider(IMvcBuilder)

Registers SessionStateTempDataProvider as the default ITempDataProvider in the IServiceCollection.

AddViewComponentsAsServices(IMvcBuilder) AddViewComponentsAsServices(IMvcBuilder) AddViewComponentsAsServices(IMvcBuilder)

Registers discovered view components as services in the IServiceCollection.

AddViewOptions(IMvcBuilder, Action<MvcViewOptions>) AddViewOptions(IMvcBuilder, Action<MvcViewOptions>) AddViewOptions(IMvcBuilder, Action<MvcViewOptions>)

Adds configuration of MvcViewOptions for the application.

AddXmlDataContractSerializerFormatters(IMvcBuilder) AddXmlDataContractSerializerFormatters(IMvcBuilder) AddXmlDataContractSerializerFormatters(IMvcBuilder)

Adds the XML DataContractSerializer formatters to MVC.

AddXmlDataContractSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>) AddXmlDataContractSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>) AddXmlDataContractSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>)

Adds the XML DataContractSerializer formatters to MVC.

AddXmlOptions(IMvcBuilder, Action<MvcXmlOptions>) AddXmlOptions(IMvcBuilder, Action<MvcXmlOptions>) AddXmlOptions(IMvcBuilder, Action<MvcXmlOptions>)

Adds configuration of MvcXmlOptions for the application.

AddXmlSerializerFormatters(IMvcBuilder) AddXmlSerializerFormatters(IMvcBuilder) AddXmlSerializerFormatters(IMvcBuilder)

Adds the XML Serializer formatters to MVC.

AddXmlSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>) AddXmlSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>) AddXmlSerializerFormatters(IMvcBuilder, Action<MvcXmlOptions>)

Adds the XML Serializer formatters to MVC.

AddCacheTagHelperLimits(IMvcBuilder, Action<CacheTagHelperOptions>) AddCacheTagHelperLimits(IMvcBuilder, Action<CacheTagHelperOptions>) AddCacheTagHelperLimits(IMvcBuilder, Action<CacheTagHelperOptions>)

Configures the memory size limits on the cache of the CacheTagHelper.

AddWebApiConventions(IMvcBuilder) AddWebApiConventions(IMvcBuilder) AddWebApiConventions(IMvcBuilder)

Applies to