IMvcCoreBuilder IMvcCoreBuilder IMvcCoreBuilder IMvcCoreBuilder Interface

Definition

An interface for configuring essential MVC services.

public interface class IMvcCoreBuilder
public interface IMvcCoreBuilder
type IMvcCoreBuilder = interface
Public Interface IMvcCoreBuilder

Properties

PartManager PartManager PartManager PartManager

Gets the ApplicationPartManager where ApplicationParts are configured.

Services Services Services Services

Gets the Microsoft.Extensions.DependencyInjection.IServiceCollection where essential MVC services are configured.

Extension Methods

AddApiExplorer(IMvcCoreBuilder) AddApiExplorer(IMvcCoreBuilder) AddApiExplorer(IMvcCoreBuilder) AddApiExplorer(IMvcCoreBuilder)

Configures IMvcCoreBuilder to use ApiExplorer.

AddApplicationPart(IMvcCoreBuilder, Assembly) 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)

Configures authentication and authorization services for builder.

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

Configures authentication and authorization services for builder.

AddControllersAsServices(IMvcCoreBuilder) AddControllersAsServices(IMvcCoreBuilder) AddControllersAsServices(IMvcCoreBuilder) AddControllersAsServices(IMvcCoreBuilder)

Registers discovered controllers as services in the Microsoft.Extensions.DependencyInjection.IServiceCollection.

AddFormatterMappings(IMvcCoreBuilder) AddFormatterMappings(IMvcCoreBuilder) AddFormatterMappings(IMvcCoreBuilder) AddFormatterMappings(IMvcCoreBuilder)

Adds services to support FormatterMappings.

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

Configures FormatterMappings for the specified setupAction.

AddJsonOptions(IMvcCoreBuilder, Action<JsonOptions>) AddJsonOptions(IMvcCoreBuilder, Action<JsonOptions>) AddJsonOptions(IMvcCoreBuilder, Action<JsonOptions>) AddJsonOptions(IMvcCoreBuilder, Action<JsonOptions>)

Configures JsonOptions for the specified builder.

AddMvcOptions(IMvcCoreBuilder, Action<MvcOptions>) 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>) ConfigureApiBehaviorOptions(IMvcCoreBuilder, Action<ApiBehaviorOptions>)

Configures ApiBehaviorOptions.

ConfigureApplicationPartManager(IMvcCoreBuilder, Action<ApplicationPartManager>) 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) SetCompatibilityVersion(IMvcCoreBuilder, CompatibilityVersion)

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

AddCors(IMvcCoreBuilder) AddCors(IMvcCoreBuilder) AddCors(IMvcCoreBuilder) AddCors(IMvcCoreBuilder)

Configures IMvcCoreBuilder to use CORS.

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

Configures IMvcCoreBuilder to use CORS.

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

Configures CorsOptions.

AddDataAnnotations(IMvcCoreBuilder) AddDataAnnotations(IMvcCoreBuilder) AddDataAnnotations(IMvcCoreBuilder) AddDataAnnotations(IMvcCoreBuilder)

Registers MVC data annotations.

AddDataAnnotationsLocalization(IMvcCoreBuilder) 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>) AddDataAnnotationsLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>)

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

AddJsonFormatters(IMvcCoreBuilder) AddJsonFormatters(IMvcCoreBuilder) AddJsonFormatters(IMvcCoreBuilder) AddJsonFormatters(IMvcCoreBuilder)
AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>) AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>) AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>) AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>)
AddJsonOptions(IMvcCoreBuilder, Action<MvcJsonOptions>) 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) AddMvcLocalization(IMvcCoreBuilder)

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

AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) 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>) 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>) 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>) 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) 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>) 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>) AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>)

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

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

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat) 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>) 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>) AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

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

Registers discovered tag helpers as services and changes the existing ITagHelperActivator for an Microsoft.AspNetCore.Mvc.Razor.ServiceBasedTagHelperActivator.

InitializeTagHelper<TTagHelper>(IMvcCoreBuilder, Action<TTagHelper,ViewContext>) 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)
AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>) AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>) AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>) AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>)
WithRazorPagesRoot(IMvcCoreBuilder, String) WithRazorPagesRoot(IMvcCoreBuilder, String) WithRazorPagesRoot(IMvcCoreBuilder, String) WithRazorPagesRoot(IMvcCoreBuilder, String)

Configures Razor Pages to use the specified rootDirectory.

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

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

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

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

AddViews(IMvcCoreBuilder) AddViews(IMvcCoreBuilder) AddViews(IMvcCoreBuilder) AddViews(IMvcCoreBuilder)
AddViews(IMvcCoreBuilder, Action<MvcViewOptions>) AddViews(IMvcCoreBuilder, Action<MvcViewOptions>) AddViews(IMvcCoreBuilder, Action<MvcViewOptions>) AddViews(IMvcCoreBuilder, Action<MvcViewOptions>)
ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>) ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>) ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>) ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>)
AddXmlDataContractSerializerFormatters(IMvcCoreBuilder) 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>) AddXmlDataContractSerializerFormatters(IMvcCoreBuilder, Action<MvcXmlOptions>)

Adds the XML DataContractSerializer formatters to MVC.

AddXmlOptions(IMvcCoreBuilder, Action<MvcXmlOptions>) 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) AddXmlSerializerFormatters(IMvcCoreBuilder)

Adds the XML Serializer formatters to MVC.

AddXmlSerializerFormatters(IMvcCoreBuilder, Action<MvcXmlOptions>) 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) AddCacheTagHelper(IMvcCoreBuilder)

Adds MVC cache tag helper services to the application.

AddCacheTagHelperLimits(IMvcCoreBuilder, Action<CacheTagHelperOptions>) 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