/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Servers/Kestrel/shared/TransportConnection.FeatureCollection.cs
53 строки
2 KB
Copilot
Implement IConnectionEndPointFeature in Kestrel, HttpSys, and IIS (#62162)
16 апр 2026, 00:36
Не верифицирован
16 апр 2026, 00:36
71f7a4d
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers; using System.IO.Pipelines; using System.Net; using Microsoft.AspNetCore.Connections.Features; #nullable enable namespace Microsoft.AspNetCore.Connections; internal partial class TransportConnection { // NOTE: When feature interfaces are added to or removed from this TransportConnection class implementation, // then the list of `features` in the generated code project MUST also be updated first // and the code generator re-reun, which will change the interface list. // See also: tools/CodeGenerator/TransportConnectionFeatureCollection.cs MemoryPool<byte> IMemoryPoolFeature.MemoryPool => MemoryPool; IDuplexPipe IConnectionTransportFeature.Transport { get => Transport; set => Transport = value; } IDictionary<object, object?> IConnectionItemsFeature.Items { get => Items; set => Items = value; } CancellationToken IConnectionLifetimeFeature.ConnectionClosed { get => ConnectionClosed; set => ConnectionClosed = value; } void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort().")); EndPoint? IConnectionEndPointFeature.LocalEndPoint { get => LocalEndPoint; set => LocalEndPoint = value; } EndPoint? IConnectionEndPointFeature.RemoteEndPoint { get => RemoteEndPoint; set => RemoteEndPoint = value; } }