/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Middleware/WebSockets/src/WebSocketsDependencyInjectionExtensions.cs
26 строк
1 KB
James Newton-King
Enable throw helper analyzers (#45954)
10 янв 2023, 03:52
Не верифицирован
10 янв 2023, 03:52
c096dbb
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.WebSockets; /// <summary> /// Extension method for <see cref="IServiceCollection"/> to add WebSockets configuration. /// </summary> public static class WebSocketsDependencyInjectionExtensions { /// <summary> /// Extension method for <see cref="IServiceCollection"/> to add WebSockets configuration. /// </summary> /// <param name="services">The service collection to add WebSockets specific configuration to.</param> /// <param name="configure">The configuration callback to setup <see cref="WebSocketOptions"/>.</param> /// <returns></returns> public static IServiceCollection AddWebSockets(this IServiceCollection services, Action<WebSocketOptions> configure) { ArgumentNullException.ThrowIfNull(configure); return services.Configure(configure); } }