IMvcCoreBuilder IMvcCoreBuilder IMvcCoreBuilder Interface

Definition

An interface for configuring essential MVC services.

public interface IMvcCoreBuilder
type IMvcCoreBuilder = interface
Public Interface IMvcCoreBuilder
Derived

Properties

PartManager PartManager PartManager

Gets the ApplicationPartManager where ApplicationParts are configured.

Services Services Services

Gets the IServiceCollection where essential MVC services are configured.

Extension Methods

AddApiExplorer(IMvcCoreBuilder) AddApiExplorer(IMvcCoreBuilder) AddApiExplorer(IMvcCoreBuilder)
AddApplicationPart(IMvcCoreBuilder, Assembly) AddApplicationPart(IMvcCoreBuilder, Assembly) AddApplicationPart(IMvcCoreBuilder, Assembly)

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

AddAuthorization(IMvcCoreBuilder) AddAuthorization(IMvcCoreBuilder) AddAuthorization(IMvcCoreBuilder)
AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>) AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>) AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>)
AddControllersAsServices(IMvcCoreBuilder) AddControllersAsServices(IMvcCoreBuilder) AddControllersAsServices(IMvcCoreBuilder)

Registers discovered controllers as services in the IServiceCollection.

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

Registers an action to configure MvcOptions.

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

Configures ApiBehaviorOptions.

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

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

SetCompatibilityVersion(IMvcCoreBuilder, CompatibilityVersion) SetCompatibilityVersion(IMvcCoreBuilder, CompatibilityVersion) SetCompatibilityVersion(IMvcCoreBuilder, CompatibilityVersion)

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

AddCors(IMvcCoreBuilder) AddCors(IMvcCoreBuilder) AddCors(IMvcCoreBuilder)
AddCors(IMvcCoreBuilder, Action<CorsOptions>) AddCors(IMvcCoreBuilder, Action<CorsOptions>) AddCors(IMvcCoreBuilder, Action<CorsOptions>)
ConfigureCors(IMvcCoreBuilder, Action<CorsOptions>) ConfigureCors(IMvcCoreBuilder, Action<CorsOptions>) ConfigureCors(IMvcCoreBuilder, Action<CorsOptions>)
AddDataAnnotations(IMvcCoreBuilder) AddDataAnnotations(IMvcCoreBuilder) AddDataAnnotations(IMvcCoreBuilder)

Registers MVC data annotations.

AddDataAnnotationsLocalization(IMvcCoreBuilder) AddDataAnnotationsLocalization(IMvcCoreBuilder) AddDataAnnotationsLocalization(IMvcCoreBuilder)

Adds MVC data annotations localization to the application.

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

Registers an action to configure MvcDataAnnotationsLocalizationOptions for MVC data annotations localization.

AddJsonFormatters(IMvcCoreBuilder) AddJsonFormatters(IMvcCoreBuilder) AddJsonFormatters(IMvcCoreBuilder)
AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>) AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>) AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>)
AddJsonOptions(IMvcCoreBuilder, Action<MvcJsonOptions>) AddJsonOptions(IMvcCoreBuilder, Action<MvcJsonOptions>) AddJsonOptions(IMvcCoreBuilder, Action<MvcJsonOptions>)

Adds configuration of MvcJsonOptions for the application.

AddMvcLocalization(IMvcCoreBuilder) AddMvcLocalization(IMvcCoreBuilder) AddMvcLocalization(IMvcCoreBuilder)

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

AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

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

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

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

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

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

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

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

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

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

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

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

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

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

AddViewLocalization(IMvcCoreBuilder) AddViewLocalization(IMvcCoreBuilder) AddViewLocalization(IMvcCoreBuilder)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

Adds MVC view localization services to the application.

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

Adds MVC view localization services to the application.

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

Adds MVC view localization services to the application.

AddRazorViewEngine(IMvcCoreBuilder) AddRazorViewEngine(IMvcCoreBuilder) AddRazorViewEngine(IMvcCoreBuilder)
AddRazorViewEngine(IMvcCoreBuilder, Action<RazorViewEngineOptions>) AddRazorViewEngine(IMvcCoreBuilder, Action<RazorViewEngineOptions>) AddRazorViewEngine(IMvcCoreBuilder, Action<RazorViewEngineOptions>)
AddTagHelpersAsServices(IMvcCoreBuilder) AddTagHelpersAsServices(IMvcCoreBuilder) AddTagHelpersAsServices(IMvcCoreBuilder)

Registers discovered tag helpers as services and changes the existing ITagHelperActivator for an ServiceBasedTagHelperActivator.

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

Adds an initialization callback for a given TTagHelper.

AddRazorPages(IMvcCoreBuilder) AddRazorPages(IMvcCoreBuilder) AddRazorPages(IMvcCoreBuilder)
AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>) AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>) AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>)
WithRazorPagesRoot(IMvcCoreBuilder, String) WithRazorPagesRoot(IMvcCoreBuilder, String) WithRazorPagesRoot(IMvcCoreBuilder, String)

Configures Razor Pages to use the specified rootDirectory.

AddCookieTempDataProvider(IMvcCoreBuilder) AddCookieTempDataProvider(IMvcCoreBuilder) AddCookieTempDataProvider(IMvcCoreBuilder)

Registers CookieTempDataProvider as the default ITempDataProvider in the IServiceCollection. Also registers the default view services.

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

Registers CookieTempDataProvider as the default ITempDataProvider in the IServiceCollection. Also registers the default view services.

AddViews(IMvcCoreBuilder) AddViews(IMvcCoreBuilder) AddViews(IMvcCoreBuilder)
AddViews(IMvcCoreBuilder, Action<MvcViewOptions>) AddViews(IMvcCoreBuilder, Action<MvcViewOptions>) AddViews(IMvcCoreBuilder, Action<MvcViewOptions>)
ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>) ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>) ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>)
AddXmlDataContractSerializerFormatters(IMvcCoreBuilder) AddXmlDataContractSerializerFormatters(IMvcCoreBuilder) AddXmlDataContractSerializerFormatters(IMvcCoreBuilder)

Adds the XML DataContractSerializer formatters to MVC.

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

Adds the XML DataContractSerializer formatters to MVC.

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

Adds configuration of MvcXmlOptions for the application.

AddXmlSerializerFormatters(IMvcCoreBuilder) AddXmlSerializerFormatters(IMvcCoreBuilder) AddXmlSerializerFormatters(IMvcCoreBuilder)

Adds the XML Serializer formatters to MVC.

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

Adds the XML Serializer formatters to MVC.

AddCacheTagHelper(IMvcCoreBuilder) AddCacheTagHelper(IMvcCoreBuilder) AddCacheTagHelper(IMvcCoreBuilder)

Adds MVC cache tag helper services to the application.

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

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

Applies to