Partager via


WebSocketsDependencyInjectionExtensions.AddWebSockets Méthode

Définition

Méthode d’extension pour IServiceCollection ajouter la configuration 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

Paramètres

services
IServiceCollection

Collection de services à laquelle ajouter une configuration spécifique à WebSockets.

configure
Action<WebSocketOptions>

Rappel de configuration pour configurer WebSocketOptions.

Retours

S’applique à