aspnetcore/src/Microsoft.AspNetCore.Socket.../SocketsDependencyInjectionE...

20 lines
704 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Sockets;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Microsoft.Extensions.DependencyInjection
{
public static class SocketsDependencyInjectionExtensions
{
public static IServiceCollection AddSockets(this IServiceCollection services)
{
services.AddRouting();
services.AddAuthorizationPolicyEvaluator();
services.TryAddSingleton<HttpConnectionDispatcher>();
return services.AddSocketsCore();
}
}
}