Dela via


IMvcCoreBuilder Interface

Definition

An interface for configuring essential MVC services.

public interface IMvcCoreBuilder
type IMvcCoreBuilder = interface
Public Interface IMvcCoreBuilder

Properties

PartManager

Gets the ApplicationPartManager where ApplicationParts are configured.

Services

Gets the IServiceCollection where essential MVC services are configured.

Extension Methods

AddApiExplorer(IMvcCoreBuilder)

Configures IMvcCoreBuilder to use ApiExplorer.

AddApplicationPart(IMvcCoreBuilder, Assembly)

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

AddAuthorization(IMvcCoreBuilder, Action<AuthorizationOptions>)

Configures authentication and authorization services for builder.

AddAuthorization(IMvcCoreBuilder)

Configures authentication and authorization services for builder.

AddControllersAsServices(IMvcCoreBuilder)

Registers discovered controllers as services in the IServiceCollection.

AddFormatterMappings(IMvcCoreBuilder, Action<FormatterMappings>)

Configures FormatterMappings for the specified setupAction.

AddFormatterMappings(IMvcCoreBuilder)

Adds services to support FormatterMappings.

AddJsonOptions(IMvcCoreBuilder, Action<JsonOptions>)

Configures JsonOptions for the specified builder.

AddMvcOptions(IMvcCoreBuilder, Action<MvcOptions>)

Registers an action to configure MvcOptions.

ConfigureApiBehaviorOptions(IMvcCoreBuilder, Action<ApiBehaviorOptions>)

Configures ApiBehaviorOptions.

ConfigureApplicationPartManager(IMvcCoreBuilder, Action<ApplicationPartManager>)

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

SetCompatibilityVersion(IMvcCoreBuilder, CompatibilityVersion)
Obsolete.

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

AddCors(IMvcCoreBuilder, Action<CorsOptions>)

Configures IMvcCoreBuilder to use CORS.

AddCors(IMvcCoreBuilder)

Configures IMvcCoreBuilder to use CORS.

ConfigureCors(IMvcCoreBuilder, Action<CorsOptions>)

Configures CorsOptions.

AddDataAnnotations(IMvcCoreBuilder)

Registers MVC data annotations.

AddDataAnnotationsLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>)

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

AddDataAnnotationsLocalization(IMvcCoreBuilder)

Adds MVC data annotations localization to the application.

AddJsonFormatters(IMvcCoreBuilder, Action<JsonSerializerSettings>)
AddJsonFormatters(IMvcCoreBuilder)
AddJsonOptions(IMvcCoreBuilder, Action<MvcJsonOptions>)
AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)

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

AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

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

AddMvcLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>)

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

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

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

AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat)

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

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

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

AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

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

AddMvcLocalization(IMvcCoreBuilder)

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

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder)

Adds MVC view localization services to the application.

AddRazorViewEngine(IMvcCoreBuilder, Action<RazorViewEngineOptions>)

Registers Razor view engine services.

AddRazorViewEngine(IMvcCoreBuilder)

Registers Razor view engine services.

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>)

Adds an initialization callback for a given TTagHelper.

AddRazorPages(IMvcCoreBuilder, Action<RazorPagesOptions>)

Register services needed for Razor Pages.

AddRazorPages(IMvcCoreBuilder)

Register services needed for Razor Pages.

WithRazorPagesRoot(IMvcCoreBuilder, String)

Configures Razor Pages to use the specified rootDirectory.

AddCookieTempDataProvider(IMvcCoreBuilder, Action<CookieTempDataProviderOptions>)

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

AddCookieTempDataProvider(IMvcCoreBuilder)

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

AddViews(IMvcCoreBuilder, Action<MvcViewOptions>)

Add view related services.

AddViews(IMvcCoreBuilder)

Add view related services.

ConfigureViews(IMvcCoreBuilder, Action<MvcViewOptions>)

Configures MvcViewOptions.

AddXmlDataContractSerializerFormatters(IMvcCoreBuilder, Action<MvcXmlOptions>)

Adds the XML DataContractSerializer formatters to MVC.

AddXmlDataContractSerializerFormatters(IMvcCoreBuilder)

Adds the XML DataContractSerializer formatters to MVC.

AddXmlOptions(IMvcCoreBuilder, Action<MvcXmlOptions>)

Adds configuration of MvcXmlOptions for the application.

AddXmlSerializerFormatters(IMvcCoreBuilder, Action<MvcXmlOptions>)

Adds the XML Serializer formatters to MVC.

AddXmlSerializerFormatters(IMvcCoreBuilder)

Adds the XML Serializer formatters to MVC.

AddNewtonsoftJson(IMvcCoreBuilder, Action<MvcNewtonsoftJsonOptions>)

Configures Newtonsoft.Json specific features such as input and output formatters.

AddNewtonsoftJson(IMvcCoreBuilder)

Configures Newtonsoft.Json specific features such as input and output formatters.

AddRazorRuntimeCompilation(IMvcCoreBuilder, Action<MvcRazorRuntimeCompilationOptions>)

Configures IMvcCoreBuilder to support runtime compilation of Razor views and Razor Pages.

AddRazorRuntimeCompilation(IMvcCoreBuilder)

Configures IMvcCoreBuilder to support runtime compilation of Razor views and Razor Pages.

AddCacheTagHelper(IMvcCoreBuilder)

Adds MVC cache tag helper services to the application.

AddCacheTagHelperLimits(IMvcCoreBuilder, Action<CacheTagHelperOptions>)

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

Applies to