ResponseCompressionServicesExtensions.AddResponseCompression ResponseCompressionServicesExtensions.AddResponseCompression ResponseCompressionServicesExtensions.AddResponseCompression ResponseCompressionServicesExtensions.AddResponseCompression Method

Definition

Overloads

AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection)

Add response compression services.

AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>)

Add response compression services and configure the related options.

AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection) AddResponseCompression(IServiceCollection)

Add response compression services.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddResponseCompression(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCompression (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddResponseCompression : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddResponseCompression (services As IServiceCollection) As IServiceCollection

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection for adding services.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>) AddResponseCompression(IServiceCollection, Action<ResponseCompressionOptions>)

Add response compression services and configure the related options.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddResponseCompression(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::ResponseCompression::ResponseCompressionOptions ^> ^ configureOptions);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCompression (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.ResponseCompression.ResponseCompressionOptions> configureOptions);
static member AddResponseCompression : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.ResponseCompression.ResponseCompressionOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddResponseCompression (services As IServiceCollection, configureOptions As Action(Of ResponseCompressionOptions)) As IServiceCollection

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection for adding services.

configureOptions
Action<ResponseCompressionOptions>

A delegate to configure the ResponseCompressionOptions.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

Applies to