Condividi tramite


WebSocketsDependencyInjectionExtensions.AddWebSockets Metodo

Definizione

Metodo di estensione per IServiceCollection per aggiungere la configurazione di WebSocket.

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

Parametri

services
IServiceCollection

Raccolta di servizi a cui aggiungere configurazioni specifiche di WebSocket.

configure
Action<WebSocketOptions>

Callback di configurazione per configurare WebSocketOptions.

Restituisce

Si applica a