Partilhar via


WebSocketsDependencyInjectionExtensions.AddWebSockets Método

Definição

Método de extensão para IServiceCollection adicionar a configuração de WebSockets.

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

Parâmetros

services
IServiceCollection

A coleção de serviços à qual adicionar a configuração específica do WebSockets.

configure
Action<WebSocketOptions>

O retorno de chamada de configuração para configurar WebSocketOptions.

Retornos

Aplica-se a