diff --git a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs index e431d6366903..b957c75ee92d 100644 --- a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs +++ b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs @@ -66,7 +66,6 @@ public sealed partial class BadHttpRequestException : System.IO.IOException { internal BadHttpRequestException() { } public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static void Throw(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method) { } } public partial class Http2Limits { @@ -166,17 +165,6 @@ public MinDataRate(double bytesPerSecond, System.TimeSpan gracePeriod) { } } namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal { - public partial class AdaptedPipeline : System.IO.Pipelines.IDuplexPipe - { - public AdaptedPipeline(System.IO.Pipelines.IDuplexPipe transport, System.IO.Pipelines.Pipe inputPipe, System.IO.Pipelines.Pipe outputPipe, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace log) { } - public System.IO.Pipelines.Pipe Input { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace Log { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.IO.Pipelines.Pipe Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - System.IO.Pipelines.PipeReader System.IO.Pipelines.IDuplexPipe.Input { get { throw null; } } - System.IO.Pipelines.PipeWriter System.IO.Pipelines.IDuplexPipe.Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task RunAsync(System.IO.Stream stream) { throw null; } - } public partial class ConnectionAdapterContext { internal ConnectionAdapterContext() { } @@ -192,37 +180,6 @@ public partial interface IConnectionAdapter bool IsHttps { get; } System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.ConnectionAdapterContext context); } - public partial class LoggingConnectionAdapter : Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.IConnectionAdapter - { - public LoggingConnectionAdapter(Microsoft.Extensions.Logging.ILogger logger) { } - public bool IsHttps { get { throw null; } } - public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.ConnectionAdapterContext context) { throw null; } - } - public partial class RawStream : System.IO.Stream - { - public RawStream(System.IO.Pipelines.PipeReader input, System.IO.Pipelines.PipeWriter output) { } - public override bool CanRead { get { throw null; } } - public override bool CanSeek { get { throw null; } } - public override bool CanWrite { get { throw null; } } - public override long Length { get { throw null; } } - public override long Position { get { throw null; } set { } } - public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; } - public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; } - public override int EndRead(System.IAsyncResult asyncResult) { throw null; } - public override void EndWrite(System.IAsyncResult asyncResult) { } - public override void Flush() { } - public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - public override int Read(byte[] buffer, int offset, int count) { throw null; } - public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } - public override void SetLength(long value) { } - public override void Write(byte[] buffer, int offset, int count) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Microsoft.AspNetCore.Server.Kestrel.Core.Features { @@ -253,1559 +210,6 @@ public partial interface ITlsApplicationProtocolFeature System.ReadOnlyMemory ApplicationProtocol { get; } } } -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal -{ - public partial class ConnectionDispatcher : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IConnectionDispatcher - { - public ConnectionDispatcher(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext serviceContext, Microsoft.AspNetCore.Connections.ConnectionDelegate connectionDelegate) { } - public System.Threading.Tasks.Task OnConnection(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection connection) { throw null; } - } - public partial class ConnectionLimitMiddleware - { - public ConnectionLimitMiddleware(Microsoft.AspNetCore.Connections.ConnectionDelegate next, long connectionLimit, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection) { throw null; } - } - public partial class ConnectionLogScope : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IReadOnlyList>, System.Collections.IEnumerable - { - public ConnectionLogScope(string connectionId) { } - public int Count { get { throw null; } } - public System.Collections.Generic.KeyValuePair this[int index] { get { throw null; } } - public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - public override string ToString() { throw null; } - } - public partial class HttpConnection : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutHandler - { - public HttpConnection(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext context) { } - public string ConnectionId { get { throw null; } } - public System.Net.IPEndPoint LocalEndPoint { get { throw null; } } - public System.Net.IPEndPoint RemoteEndPoint { get { throw null; } } - public void OnTimeout(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason reason) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestsAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication httpApplication) { throw null; } - } - public static partial class HttpConnectionBuilderExtensions - { - public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHttpServer(this Microsoft.AspNetCore.Connections.IConnectionBuilder builder, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext serviceContext, Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols protocols) { throw null; } - public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHttpServer(this Microsoft.AspNetCore.Connections.IConnectionBuilder builder, System.Collections.Generic.IList adapters, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext serviceContext, Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols protocols) { throw null; } - } - public partial class HttpConnectionContext - { - public HttpConnectionContext() { } - public System.Collections.Generic.IList ConnectionAdapters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Connections.ConnectionContext ConnectionContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.Features.IFeatureCollection ConnectionFeatures { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Net.IPEndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Buffers.MemoryPool MemoryPool { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols Protocols { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Net.IPEndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext ServiceContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl TimeoutControl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Pipelines.IDuplexPipe Transport { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class HttpConnectionMiddleware - { - public HttpConnectionMiddleware(System.Collections.Generic.IList adapters, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext serviceContext, Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols protocols) { } - public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Connections.ConnectionContext connectionContext) { throw null; } - } - public partial interface IRequestProcessor - { - void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException ex); - void HandleReadDataRateTimeout(); - void HandleRequestHeadersTimeout(); - void OnInputOrOutputCompleted(); - System.Threading.Tasks.Task ProcessRequestsAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application); - void StopProcessingNextRequest(); - void Tick(System.DateTimeOffset now); - } - public partial class KestrelServerOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions - { - public KestrelServerOptionsSetup(System.IServiceProvider services) { } - public void Configure(Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions options) { } - } - public partial class KestrelTrace : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace, Microsoft.Extensions.Logging.ILogger - { - protected readonly Microsoft.Extensions.Logging.ILogger _logger; - public KestrelTrace(Microsoft.Extensions.Logging.ILogger logger) { } - public virtual void ApplicationAbortedConnection(string connectionId, string traceIdentifier) { } - public virtual void ApplicationError(string connectionId, string traceIdentifier, System.Exception ex) { } - public virtual void ApplicationNeverCompleted(string connectionId) { } - public virtual System.IDisposable BeginScope(TState state) { throw null; } - public virtual void ConnectionBadRequest(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException ex) { } - public virtual void ConnectionDisconnect(string connectionId) { } - public virtual void ConnectionHeadResponseBodyWrite(string connectionId, long count) { } - public virtual void ConnectionKeepAlive(string connectionId) { } - public virtual void ConnectionPause(string connectionId) { } - public virtual void ConnectionRejected(string connectionId) { } - public virtual void ConnectionResume(string connectionId) { } - public virtual void ConnectionStart(string connectionId) { } - public virtual void ConnectionStop(string connectionId) { } - public virtual void HeartbeatSlow(System.TimeSpan interval, System.DateTimeOffset now) { } - public virtual void HPackDecodingError(string connectionId, int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HPackDecodingException ex) { } - public virtual void HPackEncodingError(string connectionId, int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HPackEncodingException ex) { } - public virtual void Http2ConnectionClosed(string connectionId, int highestOpenedStreamId) { } - public virtual void Http2ConnectionClosing(string connectionId) { } - public virtual void Http2ConnectionError(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ConnectionErrorException ex) { } - public void Http2FrameReceived(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame) { } - public void Http2FrameSending(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame) { } - public virtual void Http2StreamError(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2StreamErrorException ex) { } - public void Http2StreamResetAbort(string traceIdentifier, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode error, Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } - public virtual bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) { throw null; } - public virtual void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) { } - public virtual void NotAllConnectionsAborted() { } - public virtual void NotAllConnectionsClosedGracefully() { } - public virtual void RequestBodyDone(string connectionId, string traceIdentifier) { } - public virtual void RequestBodyDrainTimedOut(string connectionId, string traceIdentifier) { } - public virtual void RequestBodyMinimumDataRateNotSatisfied(string connectionId, string traceIdentifier, double rate) { } - public virtual void RequestBodyNotEntirelyRead(string connectionId, string traceIdentifier) { } - public virtual void RequestBodyStart(string connectionId, string traceIdentifier) { } - public virtual void RequestProcessingError(string connectionId, System.Exception ex) { } - public virtual void ResponseMinimumDataRateNotSatisfied(string connectionId, string traceIdentifier) { } - } - public partial class ServiceContext - { - public ServiceContext() { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ConnectionManager ConnectionManager { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.DateHeaderValueManager DateHeaderValueManager { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.Heartbeat Heartbeat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser HttpParser { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace Log { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Pipelines.PipeScheduler Scheduler { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions ServerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ISystemClock SystemClock { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http -{ - [System.FlagsAttribute] - public enum ConnectionOptions - { - Close = 1, - KeepAlive = 2, - None = 0, - Upgrade = 4, - } - public partial class DateHeaderValueManager : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IHeartbeatHandler - { - public DateHeaderValueManager() { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.DateHeaderValueManager.DateHeaderValues GetDateHeaderValues() { throw null; } - public void OnHeartbeat(System.DateTimeOffset now) { } - public partial class DateHeaderValues - { - public byte[] Bytes; - public string String; - public DateHeaderValues() { } - } - } - public partial class Http1ChunkedEncodingMessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody - { - public Http1ChunkedEncodingMessageBody(bool keepAlive, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection)) { } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception exception) { } - protected void Copy(System.Buffers.ReadOnlySequence readableBuffer, System.IO.Pipelines.PipeWriter writableBuffer) { } - protected override void OnReadStarted() { } - protected override System.Threading.Tasks.Task OnStopAsync() { throw null; } - public override void OnWriterCompleted(System.Action callback, object state) { } - protected bool Read(System.Buffers.ReadOnlySequence readableBuffer, System.IO.Pipelines.PipeWriter writableBuffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override bool TryRead(out System.IO.Pipelines.ReadResult readResult) { throw null; } - } - public partial class Http1Connection : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol, Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinRequestBodyDataRateFeature, Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinResponseDataRateFeature, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.IRequestProcessor - { - protected readonly long _keepAliveTicks; - public Http1Connection(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext)) { } - public System.IO.Pipelines.PipeReader Input { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Buffers.MemoryPool MemoryPool { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinRequestBodyDataRateFeature.MinDataRate { get { throw null; } set { } } - Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinResponseDataRateFeature.MinDataRate { get { throw null; } set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinRequestBodyDataRate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinResponseDataRate { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool RequestTimedOut { get { throw null; } } - public void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } - protected override void ApplicationAbort() { } - protected override bool BeginRead(out System.Threading.Tasks.ValueTask awaitable) { throw null; } - protected override void BeginRequestProcessing() { } - protected override Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody CreateMessageBody() { throw null; } - protected override string CreateRequestId() { throw null; } - public void HandleReadDataRateTimeout() { } - public void HandleRequestHeadersTimeout() { } - void Microsoft.AspNetCore.Server.Kestrel.Core.Internal.IRequestProcessor.Tick(System.DateTimeOffset now) { } - public void OnInputOrOutputCompleted() { } - protected override void OnRequestProcessingEnded() { } - protected override void OnRequestProcessingEnding() { } - protected override void OnReset() { } - public void OnStartLine(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion version, System.Span target, System.Span path, System.Span query, System.Span customMethod, bool pathEncoded) { } - public void ParseRequest(System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - public void SendTimeoutResponse() { } - public void StopProcessingNextRequest() { } - public bool TakeMessageHeaders(System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - public bool TakeStartLine(System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - protected override bool TryParseRequest(System.IO.Pipelines.ReadResult result, out bool endConnection) { throw null; } - } - public partial class Http1ContentLengthMessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody - { - public Http1ContentLengthMessageBody(bool keepAlive, long contentLength, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection)) { } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception exception) { } - protected override void OnReadStarting() { } - protected override System.Threading.Tasks.Task OnStopAsync() { throw null; } - public override void OnWriterCompleted(System.Action callback, object state) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override bool TryRead(out System.IO.Pipelines.ReadResult readResult) { throw null; } - } - public abstract partial class Http1MessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody - { - protected readonly Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection _context; - protected Http1MessageBody(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol), default(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate)) { } - protected void CheckCompletedReadResult(System.IO.Pipelines.ReadResult result) { } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody For(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion httpVersion, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestHeaders headers, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) { throw null; } - protected override System.Threading.Tasks.Task OnConsumeAsync() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - protected System.Threading.Tasks.Task OnConsumeAsyncAwaited() { throw null; } - } - public partial class Http1OutputProducer : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputProducer, System.IDisposable - { - public Http1OutputProducer(System.IO.Pipelines.PipeWriter pipeWriter, string connectionId, Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace log, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl timeoutControl, Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinResponseDataRateFeature minResponseDataRateFeature, System.Buffers.MemoryPool memoryPool) { } - public void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException error) { } - public void Advance(int bytes) { } - public void CancelPendingFlush() { } - public void Complete() { } - public void Dispose() { } - public System.Threading.Tasks.ValueTask FirstWriteAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan buffer, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask FirstWriteChunkedAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan buffer, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Memory GetMemory(int sizeHint = 0) { throw null; } - public System.Span GetSpan(int sizeHint = 0) { throw null; } - public void Reset() { } - public System.Threading.Tasks.ValueTask Write100ContinueAsync() { throw null; } - public System.Threading.Tasks.ValueTask WriteChunkAsync(System.ReadOnlySpan buffer, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.Task WriteDataAsync(System.ReadOnlySpan buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Threading.Tasks.ValueTask WriteDataToPipeAsync(System.ReadOnlySpan buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public void WriteResponseHeaders(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk) { } - public System.Threading.Tasks.ValueTask WriteStreamSuffixAsync() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Http1ParsingHandler : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler - { - public readonly Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection Connection; - public Http1ParsingHandler(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection connection) { throw null; } - public void OnHeader(System.Span name, System.Span value) { } - public void OnStartLine(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion version, System.Span target, System.Span path, System.Span query, System.Span customMethod, bool pathEncoded) { } - } - public partial class Http1UpgradeMessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody - { - public bool _completed; - public Http1UpgradeMessageBody(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection)) { } - public override bool IsEmpty { get { throw null; } } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception exception) { } - public override System.Threading.Tasks.Task ConsumeAsync() { throw null; } - public override void OnWriterCompleted(System.Action callback, object state) { } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.Task StopAsync() { throw null; } - public override bool TryRead(out System.IO.Pipelines.ReadResult result) { throw null; } - } - public abstract partial class HttpHeaders : Microsoft.AspNetCore.Http.IHeaderDictionary, System.Collections.Generic.ICollection>, System.Collections.Generic.IDictionary, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable - { - protected System.Collections.Generic.Dictionary MaybeUnknown; - protected long? _contentLength; - protected bool _isReadOnly; - protected HttpHeaders() { } - public long? ContentLength { get { throw null; } set { } } - public int Count { get { throw null; } } - Microsoft.Extensions.Primitives.StringValues Microsoft.AspNetCore.Http.IHeaderDictionary.this[string key] { get { throw null; } set { } } - bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } - Microsoft.Extensions.Primitives.StringValues System.Collections.Generic.IDictionary.this[string key] { get { throw null; } set { } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } - protected System.Collections.Generic.Dictionary Unknown { get { throw null; } } - protected virtual bool AddValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]protected static Microsoft.Extensions.Primitives.StringValues AppendValue(in Microsoft.Extensions.Primitives.StringValues existing, string append) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]protected static int BitCount(long value) { throw null; } - protected virtual void ClearFast() { } - protected virtual bool CopyToFast(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } - protected virtual int GetCountFast() { throw null; } - protected virtual System.Collections.Generic.IEnumerator> GetEnumeratorFast() { throw null; } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.TransferCoding GetFinalTransferCoding(in Microsoft.Extensions.Primitives.StringValues transferEncoding) { throw null; } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.ConnectionOptions ParseConnection(in Microsoft.Extensions.Primitives.StringValues connection) { throw null; } - protected virtual bool RemoveFast(string key) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Reset() { } - public void SetReadOnly() { } - protected virtual void SetValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { } - void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) { } - void System.Collections.Generic.ICollection>.Clear() { } - bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) { throw null; } - void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { } - bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) { throw null; } - void System.Collections.Generic.IDictionary.Add(string key, Microsoft.Extensions.Primitives.StringValues value) { } - bool System.Collections.Generic.IDictionary.ContainsKey(string key) { throw null; } - bool System.Collections.Generic.IDictionary.Remove(string key) { throw null; } - bool System.Collections.Generic.IDictionary.TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value) { throw null; } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - protected static void ThrowArgumentException() { } - protected static void ThrowDuplicateKeyException() { } - protected static void ThrowHeadersReadOnlyException() { } - protected static void ThrowKeyNotFoundException() { } - protected virtual bool TryGetValueFast(string key, out Microsoft.Extensions.Primitives.StringValues value) { throw null; } - public static void ValidateHeaderNameCharacters(string headerCharacters) { } - public static void ValidateHeaderValueCharacters(in Microsoft.Extensions.Primitives.StringValues headerValues) { } - public static void ValidateHeaderValueCharacters(string headerCharacters) { } - } - public enum HttpMethod : byte - { - Connect = (byte)7, - Custom = (byte)9, - Delete = (byte)2, - Get = (byte)0, - Head = (byte)4, - None = (byte)255, - Options = (byte)8, - Patch = (byte)6, - Post = (byte)3, - Put = (byte)1, - Trace = (byte)5, - } - public partial class HttpParser : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser where TRequestHandler : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler - { - public HttpParser() { } - public HttpParser(bool showErrorDetails) { } - bool Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser.ParseHeaders(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined, out int consumedBytes) { throw null; } - bool Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser.ParseRequestLine(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - public bool ParseHeaders(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined, out int consumedBytes) { throw null; } - public bool ParseRequestLine(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined) { throw null; } - } - public abstract partial class HttpProtocol : Microsoft.AspNetCore.Http.Features.IFeatureCollection, Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature, Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature, Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature, Microsoft.AspNetCore.Http.Features.IHttpRequestFeature, Microsoft.AspNetCore.Http.Features.IHttpRequestIdentifierFeature, Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature, Microsoft.AspNetCore.Http.Features.IHttpResponseFeature, Microsoft.AspNetCore.Http.Features.IHttpResponseStartFeature, Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature, Microsoft.AspNetCore.Http.Features.IRequestBodyPipeFeature, Microsoft.AspNetCore.Http.Features.IResponseBodyPipeFeature, Microsoft.AspNetCore.Http.IDefaultHttpContextContainer, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpResponseControl, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable - { - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.BodyControl bodyControl; - protected System.Exception _applicationException; - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion _httpVersion; - protected volatile bool _keepAlive; - protected string _methodText; - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestProcessingStatus _requestProcessingStatus; - public HttpProtocol(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext context) { } - public bool AllowSynchronousIO { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.Features.IFeatureCollection ConnectionFeatures { get { throw null; } } - protected string ConnectionId { get { throw null; } } - public string ConnectionIdFeature { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool HasFlushedHeaders { get { throw null; } } - public bool HasResponseStarted { get { throw null; } } - public bool HasStartedConsumingRequestBody { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestHeaders HttpRequestHeaders { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpResponseControl HttpResponseControl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders HttpResponseHeaders { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string HttpVersion { get { throw null; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]set { } } - public bool IsUpgradableRequest { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool IsUpgraded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Net.IPAddress LocalIpAddress { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int LocalPort { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace Log { get { throw null; } } - public long? MaxRequestBodySize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod Method { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - bool Microsoft.AspNetCore.Http.Features.IFeatureCollection.IsReadOnly { get { throw null; } } - object Microsoft.AspNetCore.Http.Features.IFeatureCollection.this[System.Type key] { get { throw null; } set { } } - int Microsoft.AspNetCore.Http.Features.IFeatureCollection.Revision { get { throw null; } } - bool Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature.AllowSynchronousIO { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.ConnectionId { get { throw null; } set { } } - System.Net.IPAddress Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.LocalIpAddress { get { throw null; } set { } } - int Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.LocalPort { get { throw null; } set { } } - System.Net.IPAddress Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.RemoteIpAddress { get { throw null; } set { } } - int Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.RemotePort { get { throw null; } set { } } - bool Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature.IsReadOnly { get { throw null; } } - long? Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature.MaxRequestBodySize { get { throw null; } set { } } - System.IO.Stream Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Body { get { throw null; } set { } } - Microsoft.AspNetCore.Http.IHeaderDictionary Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Headers { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Method { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Path { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.PathBase { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Protocol { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.QueryString { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.RawTarget { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.Scheme { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpRequestIdentifierFeature.TraceIdentifier { get { throw null; } set { } } - System.Threading.CancellationToken Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature.RequestAborted { get { throw null; } set { } } - System.IO.Stream Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.Body { get { throw null; } set { } } - bool Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.HasStarted { get { throw null; } } - Microsoft.AspNetCore.Http.IHeaderDictionary Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.Headers { get { throw null; } set { } } - string Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.ReasonPhrase { get { throw null; } set { } } - int Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.StatusCode { get { throw null; } set { } } - bool Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature.IsUpgradableRequest { get { throw null; } } - System.IO.Pipelines.PipeReader Microsoft.AspNetCore.Http.Features.IRequestBodyPipeFeature.Reader { get { throw null; } set { } } - System.IO.Pipelines.PipeWriter Microsoft.AspNetCore.Http.Features.IResponseBodyPipeFeature.Writer { get { throw null; } set { } } - Microsoft.AspNetCore.Http.DefaultHttpContext Microsoft.AspNetCore.Http.IDefaultHttpContextContainer.HttpContext { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputProducer Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]protected set { } } - public string Path { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string PathBase { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string QueryString { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string RawTarget { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string ReasonPhrase { get { throw null; } set { } } - public System.Net.IPAddress RemoteIpAddress { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int RemotePort { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Threading.CancellationToken RequestAborted { get { throw null; } set { } } - public System.IO.Stream RequestBody { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Pipelines.PipeReader RequestBodyPipeReader { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.IHeaderDictionary RequestHeaders { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Stream ResponseBody { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.IHeaderDictionary ResponseHeaders { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Pipelines.PipeWriter ResponsePipeWriter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public string Scheme { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions ServerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext ServiceContext { get { throw null; } } - public int StatusCode { get { throw null; } set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl TimeoutControl { get { throw null; } } - public string TraceIdentifier { get { throw null; } set { } } - protected void AbortRequest() { } - public void Advance(int bytes) { } - protected abstract void ApplicationAbort(); - protected virtual bool BeginRead(out System.Threading.Tasks.ValueTask awaitable) { throw null; } - protected virtual void BeginRequestProcessing() { } - public void CancelPendingFlush() { } - public void Complete(System.Exception ex) { } - protected abstract Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody CreateMessageBody(); - protected abstract string CreateRequestId(); - protected System.Threading.Tasks.Task FireOnCompleted() { throw null; } - protected System.Threading.Tasks.Task FireOnStarting() { throw null; } - public System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Threading.Tasks.ValueTask FlushPipeAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Memory GetMemory(int sizeHint = 0) { throw null; } - public System.Span GetSpan(int sizeHint = 0) { throw null; } - public void HandleNonBodyResponseWrite() { } - public void InitializeBodyControl(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody messageBody) { } - public System.Threading.Tasks.Task InitializeResponseAsync(int firstWriteByteCount) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)][System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task InitializeResponseAwaited(System.Threading.Tasks.Task startingTask, int firstWriteByteCount) { throw null; } - TFeature Microsoft.AspNetCore.Http.Features.IFeatureCollection.Get() { throw null; } - void Microsoft.AspNetCore.Http.Features.IFeatureCollection.Set(TFeature feature) { } - void Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature.Abort() { } - void Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.OnCompleted(System.Func callback, object state) { } - void Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.OnStarting(System.Func callback, object state) { } - System.Threading.Tasks.Task Microsoft.AspNetCore.Http.Features.IHttpResponseStartFeature.StartAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - System.Threading.Tasks.Task Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature.UpgradeAsync() { throw null; } - public void OnCompleted(System.Func callback, object state) { } - protected virtual void OnErrorAfterResponseStarted() { } - public void OnHeader(System.Span name, System.Span value) { } - protected virtual void OnRequestProcessingEnded() { } - protected virtual void OnRequestProcessingEnding() { } - protected abstract void OnReset(); - public void OnStarting(System.Func callback, object state) { } - protected void PoisonRequestBodyStream(System.Exception abortReason) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestsAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application) { throw null; } - public void ProduceContinue() { } - protected System.Threading.Tasks.Task ProduceEnd() { throw null; } - public void ReportApplicationError(System.Exception ex) { } - public void Reset() { } - protected void ResetHttp1Features() { } - protected void ResetHttp2Features() { } - public void SetBadRequestState(Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException ex) { } - public void StopBodies() { } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - public void ThrowRequestTargetRejected(System.Span target) { } - protected abstract bool TryParseRequest(System.IO.Pipelines.ReadResult result, out bool endConnection); - protected System.Threading.Tasks.Task TryProduceInvalidRequestResponse() { throw null; } - protected void VerifyResponseContentLength() { } - public System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.ValueTask WriteAsyncAwaited(System.Threading.Tasks.Task initializeTask, System.ReadOnlyMemory data, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask WritePipeAsync(System.ReadOnlyMemory data, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public sealed partial class HttpRequestHeaders : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders - { - public HttpRequestHeaders() { } - public bool HasConnection { get { throw null; } } - public bool HasTransferEncoding { get { throw null; } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccept { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAcceptCharset { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAcceptEncoding { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAcceptLanguage { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlRequestHeaders { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlRequestMethod { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAllow { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAuthorization { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderCacheControl { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderConnection { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentEncoding { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLanguage { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLength { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLocation { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentMD5 { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentRange { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentType { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderCookie { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderDate { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderExpect { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderExpires { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderFrom { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderHost { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderIfMatch { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderIfModifiedSince { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderIfNoneMatch { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderIfRange { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderIfUnmodifiedSince { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderKeepAlive { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderLastModified { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderMaxForwards { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderOrigin { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderPragma { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderProxyAuthorization { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderRange { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderReferer { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTE { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTrailer { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTransferEncoding { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTranslate { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderUpgrade { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderUserAgent { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderVia { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderWarning { get { throw null; } set { } } - public int HostCount { get { throw null; } } - protected override bool AddValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { throw null; } - public unsafe void Append(byte* pKeyBytes, int keyLength, string value) { } - public void Append(System.Span name, string value) { } - protected override void ClearFast() { } - protected override bool CopyToFast(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } - protected override int GetCountFast() { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestHeaders.Enumerator GetEnumerator() { throw null; } - protected override System.Collections.Generic.IEnumerator> GetEnumeratorFast() { throw null; } - protected override bool RemoveFast(string key) { throw null; } - protected override void SetValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { } - protected override bool TryGetValueFast(string key, out Microsoft.Extensions.Primitives.StringValues value) { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IEnumerator, System.IDisposable - { - private object _dummy; - private int _dummyPrimitive; - public System.Collections.Generic.KeyValuePair Current { get { throw null; } } - object System.Collections.IEnumerator.Current { get { throw null; } } - public void Dispose() { } - public bool MoveNext() { throw null; } - public void Reset() { } - } - } - public partial class HttpRequestPipeReader : System.IO.Pipelines.PipeReader - { - public HttpRequestPipeReader() { } - public void Abort(System.Exception error = null) { } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception exception = null) { } - public override void OnWriterCompleted(System.Action callback, object state) { } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public void StartAcceptingReads(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody body) { } - public void StopAcceptingReads() { } - public override bool TryRead(out System.IO.Pipelines.ReadResult result) { throw null; } - } - public enum HttpRequestTarget - { - AbsoluteForm = 1, - AsteriskForm = 3, - AuthorityForm = 2, - OriginForm = 0, - Unknown = -1, - } - public sealed partial class HttpResponseHeaders : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders - { - public HttpResponseHeaders() { } - public bool HasConnection { get { throw null; } } - public bool HasDate { get { throw null; } } - public bool HasServer { get { throw null; } } - public bool HasTransferEncoding { get { throw null; } } - public Microsoft.Extensions.Primitives.StringValues HeaderAcceptRanges { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlAllowCredentials { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlAllowHeaders { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlAllowMethods { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlAllowOrigin { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlExposeHeaders { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAccessControlMaxAge { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAge { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderAllow { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderCacheControl { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderConnection { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentEncoding { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLanguage { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLength { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentLocation { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentMD5 { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentRange { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderContentType { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderDate { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderETag { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderExpires { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderKeepAlive { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderLastModified { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderLocation { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderPragma { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderProxyAuthenticate { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderRetryAfter { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderServer { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderSetCookie { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTrailer { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderTransferEncoding { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderUpgrade { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderVary { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderVia { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderWarning { get { throw null; } set { } } - public Microsoft.Extensions.Primitives.StringValues HeaderWWWAuthenticate { get { throw null; } set { } } - protected override bool AddValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { throw null; } - protected override void ClearFast() { } - protected override bool CopyToFast(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } - protected override int GetCountFast() { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders.Enumerator GetEnumerator() { throw null; } - protected override System.Collections.Generic.IEnumerator> GetEnumeratorFast() { throw null; } - protected override bool RemoveFast(string key) { throw null; } - public void SetRawConnection(in Microsoft.Extensions.Primitives.StringValues value, byte[] raw) { } - public void SetRawDate(in Microsoft.Extensions.Primitives.StringValues value, byte[] raw) { } - public void SetRawServer(in Microsoft.Extensions.Primitives.StringValues value, byte[] raw) { } - public void SetRawTransferEncoding(in Microsoft.Extensions.Primitives.StringValues value, byte[] raw) { } - protected override void SetValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { } - protected override bool TryGetValueFast(string key, out Microsoft.Extensions.Primitives.StringValues value) { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IEnumerator, System.IDisposable - { - private object _dummy; - private int _dummyPrimitive; - public System.Collections.Generic.KeyValuePair Current { get { throw null; } } - object System.Collections.IEnumerator.Current { get { throw null; } } - public void Dispose() { } - public bool MoveNext() { throw null; } - public void Reset() { } - } - } - public partial class HttpResponsePipeWriter : System.IO.Pipelines.PipeWriter - { - public HttpResponsePipeWriter(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpResponseControl pipeControl) { } - public void Abort() { } - public override void Advance(int bytes) { } - public override void CancelPendingFlush() { } - public override void Complete(System.Exception exception = null) { } - public override System.Threading.Tasks.ValueTask FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Memory GetMemory(int sizeHint = 0) { throw null; } - public override System.Span GetSpan(int sizeHint = 0) { throw null; } - public override void OnReaderCompleted(System.Action callback, object state) { } - public void StartAcceptingWrites() { } - public void StopAcceptingWrites() { } - public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HttpResponseTrailers : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders - { - public HttpResponseTrailers() { } - public Microsoft.Extensions.Primitives.StringValues HeaderETag { get { throw null; } set { } } - protected override bool AddValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { throw null; } - protected override void ClearFast() { } - protected override bool CopyToFast(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } - protected override int GetCountFast() { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseTrailers.Enumerator GetEnumerator() { throw null; } - protected override System.Collections.Generic.IEnumerator> GetEnumeratorFast() { throw null; } - protected override bool RemoveFast(string key) { throw null; } - protected override void SetValueFast(string key, in Microsoft.Extensions.Primitives.StringValues value) { } - protected override bool TryGetValueFast(string key, out Microsoft.Extensions.Primitives.StringValues value) { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IEnumerator, System.IDisposable - { - private object _dummy; - private int _dummyPrimitive; - public System.Collections.Generic.KeyValuePair Current { get { throw null; } } - object System.Collections.IEnumerator.Current { get { throw null; } } - public void Dispose() { } - public bool MoveNext() { throw null; } - public void Reset() { } - } - } - public enum HttpScheme - { - Http = 0, - Https = 1, - Unknown = -1, - } - public enum HttpVersion - { - Http10 = 0, - Http11 = 1, - Http2 = 2, - Unknown = -1, - } - public partial interface IHttpHeadersHandler - { - void OnHeader(System.Span name, System.Span value); - } - public partial interface IHttpOutputAborter - { - void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason); - } - public partial interface IHttpOutputProducer - { - void Advance(int bytes); - void CancelPendingFlush(); - void Complete(); - System.Threading.Tasks.ValueTask FirstWriteAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask FirstWriteChunkedAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask FlushAsync(System.Threading.CancellationToken cancellationToken); - System.Memory GetMemory(int sizeHint = 0); - System.Span GetSpan(int sizeHint = 0); - void Reset(); - System.Threading.Tasks.ValueTask Write100ContinueAsync(); - System.Threading.Tasks.ValueTask WriteChunkAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.Task WriteDataAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask WriteDataToPipeAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken); - void WriteResponseHeaders(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk); - System.Threading.Tasks.ValueTask WriteStreamSuffixAsync(); - } - public partial interface IHttpParser where TRequestHandler : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler - { - bool ParseHeaders(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined, out int consumedBytes); - bool ParseRequestLine(TRequestHandler handler, in System.Buffers.ReadOnlySequence buffer, out System.SequencePosition consumed, out System.SequencePosition examined); - } - public partial interface IHttpRequestLineHandler - { - void OnStartLine(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion version, System.Span target, System.Span path, System.Span query, System.Span customMethod, bool pathEncoded); - } - public partial interface IHttpResponseControl - { - void Advance(int bytes); - void CancelPendingFlush(); - void Complete(System.Exception exception = null); - System.Threading.Tasks.ValueTask FlushPipeAsync(System.Threading.CancellationToken cancellationToken); - System.Memory GetMemory(int sizeHint = 0); - System.Span GetSpan(int sizeHint = 0); - void ProduceContinue(); - System.Threading.Tasks.ValueTask WritePipeAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken); - } - public partial interface IHttpResponsePipeWriterControl - { - void Advance(int bytes); - void CancelPendingFlush(); - System.Threading.Tasks.ValueTask FlushPipeAsync(System.Threading.CancellationToken cancellationToken); - System.Memory GetMemory(int sizeHint = 0); - System.Span GetSpan(int sizeHint = 0); - void ProduceContinue(); - System.Threading.Tasks.ValueTask WritePipeAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken); - } - public abstract partial class MessageBody - { - protected long _alreadyTimedBytes; - protected bool _backpressure; - protected bool _timingEnabled; - protected MessageBody(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol context, Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRequestBodyDataRate) { } - public virtual bool IsEmpty { get { throw null; } } - protected Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace Log { get { throw null; } } - public bool RequestKeepAlive { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]protected set { } } - public bool RequestUpgrade { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]protected set { } } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody ZeroContentLengthClose { get { throw null; } } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody ZeroContentLengthKeepAlive { get { throw null; } } - protected void AddAndCheckConsumedBytes(long consumedBytes) { } - public abstract void AdvanceTo(System.SequencePosition consumed); - public abstract void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined); - public abstract void CancelPendingRead(); - public abstract void Complete(System.Exception exception); - public virtual System.Threading.Tasks.Task ConsumeAsync() { throw null; } - protected virtual System.Threading.Tasks.Task OnConsumeAsync() { throw null; } - protected virtual void OnDataRead(long bytesRead) { } - protected virtual void OnReadStarted() { } - protected virtual void OnReadStarting() { } - protected virtual System.Threading.Tasks.Task OnStopAsync() { throw null; } - public abstract void OnWriterCompleted(System.Action callback, object state); - public abstract System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - protected System.Threading.Tasks.ValueTask StartTimingReadAsync(System.Threading.Tasks.ValueTask readAwaitable, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync() { throw null; } - protected void StopTimingRead(long bytesRead) { } - protected void TryProduceContinue() { } - public abstract bool TryRead(out System.IO.Pipelines.ReadResult readResult); - protected void TryStart() { } - protected void TryStop() { } - } - public static partial class PathNormalizer - { - public unsafe static bool ContainsDotSegments(byte* start, byte* end) { throw null; } - public static string DecodePath(System.Span path, bool pathEncoded, string rawTarget, int queryLength) { throw null; } - public unsafe static int RemoveDotSegments(byte* start, byte* end) { throw null; } - public static int RemoveDotSegments(System.Span input) { throw null; } - } - public static partial class PipelineExtensions - { - public static System.ArraySegment GetArray(this System.Memory buffer) { throw null; } - public static System.ArraySegment GetArray(this System.ReadOnlyMemory memory) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static System.ReadOnlySpan ToSpan(this System.Buffers.ReadOnlySequence buffer) { throw null; } - } - public enum ProduceEndType - { - ConnectionKeepAlive = 2, - SocketDisconnect = 1, - SocketShutdown = 0, - } - public static partial class ReasonPhrases - { - public static byte[] ToStatusBytes(int statusCode, string reasonPhrase = null) { throw null; } - } - public enum RequestProcessingStatus - { - AppStarted = 3, - HeadersCommitted = 4, - HeadersFlushed = 5, - ParsingHeaders = 2, - ParsingRequestLine = 1, - RequestPending = 0, - } - public enum RequestRejectionReason - { - BadChunkSizeData = 9, - BadChunkSuffix = 8, - ChunkedRequestIncomplete = 10, - ConnectMethodRequired = 23, - FinalTransferCodingNotChunked = 19, - HeadersExceedMaxTotalSize = 14, - InvalidCharactersInHeaderName = 12, - InvalidContentLength = 5, - InvalidHostHeader = 26, - InvalidRequestHeader = 2, - InvalidRequestHeadersNoCRLF = 3, - InvalidRequestLine = 1, - InvalidRequestTarget = 11, - LengthRequired = 20, - LengthRequiredHttp10 = 21, - MalformedRequestInvalidHeaders = 4, - MissingHostHeader = 24, - MultipleContentLengths = 6, - MultipleHostHeaders = 25, - OptionsMethodRequired = 22, - RequestBodyExceedsContentLength = 28, - RequestBodyTimeout = 18, - RequestBodyTooLarge = 16, - RequestHeadersTimeout = 17, - RequestLineTooLong = 13, - TooManyHeaders = 15, - UnexpectedEndOfRequestContent = 7, - UnrecognizedHTTPVersion = 0, - UpgradeRequestCannotHavePayload = 27, - } - [System.FlagsAttribute] - public enum TransferCoding - { - Chunked = 1, - None = 0, - Other = 2, - } - public partial class ZeroContentLengthMessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody - { - public ZeroContentLengthMessageBody(bool keepAlive) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol), default(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate)) { } - public override bool IsEmpty { get { throw null; } } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception ex) { } - public override System.Threading.Tasks.Task ConsumeAsync() { throw null; } - public override void OnWriterCompleted(System.Action callback, object state) { } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.Task StopAsync() { throw null; } - public override bool TryRead(out System.IO.Pipelines.ReadResult result) { throw null; } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 -{ - public partial class Http2Connection : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.IHttp2StreamLifetimeHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.IRequestProcessor - { - public Http2Connection(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext context) { } - public static byte[] ClientPreface { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Http.Features.IFeatureCollection ConnectionFeatures { get { throw null; } } - public string ConnectionId { get { throw null; } } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits Limits { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace Log { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ISystemClock SystemClock { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl TimeoutControl { get { throw null; } } - public void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException ex) { } - public void HandleReadDataRateTimeout() { } - public void HandleRequestHeadersTimeout() { } - void Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.IHttp2StreamLifetimeHandler.OnStreamCompleted(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream stream) { } - void Microsoft.AspNetCore.Server.Kestrel.Core.Internal.IRequestProcessor.Tick(System.DateTimeOffset now) { } - public void OnHeader(System.Span name, System.Span value) { } - public void OnInputOrOutputCompleted() { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestsAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application) { throw null; } - public void StopProcessingNextRequest() { } - public void StopProcessingNextRequest(bool serverInitiated) { } - } - public partial class Http2ConnectionErrorException : System.Exception - { - public Http2ConnectionErrorException(string message, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode ErrorCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.FlagsAttribute] - public enum Http2ContinuationFrameFlags : byte - { - END_HEADERS = (byte)4, - NONE = (byte)0, - } - [System.FlagsAttribute] - public enum Http2DataFrameFlags : byte - { - END_STREAM = (byte)1, - NONE = (byte)0, - PADDED = (byte)8, - } - public enum Http2ErrorCode : uint - { - CANCEL = (uint)8, - COMPRESSION_ERROR = (uint)9, - CONNECT_ERROR = (uint)10, - ENHANCE_YOUR_CALM = (uint)11, - FLOW_CONTROL_ERROR = (uint)3, - FRAME_SIZE_ERROR = (uint)6, - HTTP_1_1_REQUIRED = (uint)13, - INADEQUATE_SECURITY = (uint)12, - INTERNAL_ERROR = (uint)2, - NO_ERROR = (uint)0, - PROTOCOL_ERROR = (uint)1, - REFUSED_STREAM = (uint)7, - SETTINGS_TIMEOUT = (uint)4, - STREAM_CLOSED = (uint)5, - } - public partial class Http2Frame - { - public Http2Frame() { } - public bool ContinuationEndHeaders { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ContinuationFrameFlags ContinuationFlags { get { throw null; } set { } } - public bool DataEndStream { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2DataFrameFlags DataFlags { get { throw null; } set { } } - public bool DataHasPadding { get { throw null; } } - public byte DataPadLength { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int DataPayloadLength { get { throw null; } } - public byte Flags { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode GoAwayErrorCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int GoAwayLastStreamId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool HeadersEndHeaders { get { throw null; } } - public bool HeadersEndStream { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2HeadersFrameFlags HeadersFlags { get { throw null; } set { } } - public bool HeadersHasPadding { get { throw null; } } - public bool HeadersHasPriority { get { throw null; } } - public byte HeadersPadLength { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int HeadersPayloadLength { get { throw null; } } - public byte HeadersPriorityWeight { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int HeadersStreamDependency { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int PayloadLength { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool PingAck { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2PingFrameFlags PingFlags { get { throw null; } set { } } - public bool PriorityIsExclusive { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int PriorityStreamDependency { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public byte PriorityWeight { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode RstStreamErrorCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public bool SettingsAck { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsFrameFlags SettingsFlags { get { throw null; } set { } } - public int StreamId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameType Type { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int WindowUpdateSizeIncrement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public void PrepareContinuation(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ContinuationFrameFlags flags, int streamId) { } - public void PrepareData(int streamId, byte? padLength = default(byte?)) { } - public void PrepareGoAway(int lastStreamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { } - public void PrepareHeaders(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2HeadersFrameFlags flags, int streamId) { } - public void PreparePing(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2PingFrameFlags flags) { } - public void PreparePriority(int streamId, int streamDependency, bool exclusive, byte weight) { } - public void PrepareRstStream(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { } - public void PrepareSettings(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsFrameFlags flags) { } - public void PrepareWindowUpdate(int streamId, int sizeIncrement) { } - public override string ToString() { throw null; } - } - public static partial class Http2FrameReader - { - public const int HeaderLength = 9; - public const int SettingSize = 6; - public static int GetPayloadFieldsLength(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame) { throw null; } - public static bool ReadFrame(System.Buffers.ReadOnlySequence readableBuffer, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame, uint maxFrameSize, out System.Buffers.ReadOnlySequence framePayload) { throw null; } - public static System.Collections.Generic.IList ReadSettings(System.Buffers.ReadOnlySequence payload) { throw null; } - } - public enum Http2FrameType : byte - { - CONTINUATION = (byte)9, - DATA = (byte)0, - GOAWAY = (byte)7, - HEADERS = (byte)1, - PING = (byte)6, - PRIORITY = (byte)2, - PUSH_PROMISE = (byte)5, - RST_STREAM = (byte)3, - SETTINGS = (byte)4, - WINDOW_UPDATE = (byte)8, - } - public partial class Http2FrameWriter - { - public Http2FrameWriter(System.IO.Pipelines.PipeWriter outputPipeWriter, Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Connection http2Connection, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControl connectionOutputFlowControl, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl timeoutControl, Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minResponseDataRate, string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace log) { } - public void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException error) { } - public void AbortPendingStreamDataWrites(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.StreamOutputFlowControl flowControl) { } - public void Complete() { } - public System.Threading.Tasks.ValueTask FlushAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter outputAborter, System.Threading.CancellationToken cancellationToken) { throw null; } - public bool TryUpdateConnectionWindow(int bytes) { throw null; } - public bool TryUpdateStreamWindow(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.StreamOutputFlowControl flowControl, int bytes) { throw null; } - public void UpdateMaxFrameSize(uint maxFrameSize) { } - public System.Threading.Tasks.ValueTask Write100ContinueAsync(int streamId) { throw null; } - public System.Threading.Tasks.ValueTask WriteDataAsync(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.StreamOutputFlowControl flowControl, System.Buffers.ReadOnlySequence data, bool endStream) { throw null; } - public System.Threading.Tasks.ValueTask WriteGoAwayAsync(int lastStreamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { throw null; } - public System.Threading.Tasks.ValueTask WritePingAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2PingFrameFlags flags, System.Buffers.ReadOnlySequence payload) { throw null; } - public void WriteResponseHeaders(int streamId, int statusCode, Microsoft.AspNetCore.Http.IHeaderDictionary headers) { } - public System.Threading.Tasks.ValueTask WriteResponseTrailers(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseTrailers headers) { throw null; } - public System.Threading.Tasks.ValueTask WriteRstStreamAsync(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { throw null; } - public System.Threading.Tasks.ValueTask WriteSettingsAckAsync() { throw null; } - public System.Threading.Tasks.ValueTask WriteSettingsAsync(System.Collections.Generic.IList settings) { throw null; } - public System.Threading.Tasks.ValueTask WriteWindowUpdateAsync(int streamId, int sizeIncrement) { throw null; } - } - [System.FlagsAttribute] - public enum Http2HeadersFrameFlags : byte - { - END_HEADERS = (byte)4, - END_STREAM = (byte)1, - NONE = (byte)0, - PADDED = (byte)8, - PRIORITY = (byte)32, - } - public partial class Http2MessageBody : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody - { - internal Http2MessageBody() : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol), default(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate)) { } - public override void AdvanceTo(System.SequencePosition consumed) { } - public override void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined) { } - public override void CancelPendingRead() { } - public override void Complete(System.Exception exception) { } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody For(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream context, Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRequestBodyDataRate) { throw null; } - protected override void OnDataRead(long bytesRead) { } - protected override void OnReadStarted() { } - protected override void OnReadStarting() { } - protected override System.Threading.Tasks.Task OnStopAsync() { throw null; } - public override void OnWriterCompleted(System.Action callback, object state) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override bool TryRead(out System.IO.Pipelines.ReadResult readResult) { throw null; } - } - public partial class Http2OutputProducer : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputProducer - { - public Http2OutputProducer(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter frameWriter, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.StreamOutputFlowControl flowControl, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl timeoutControl, System.Buffers.MemoryPool pool, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream stream, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace log) { } - public void Advance(int bytes) { } - public void CancelPendingFlush() { } - public void Complete() { } - public void Dispose() { } - public System.Threading.Tasks.ValueTask FirstWriteAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask FirstWriteChunkedAsync(int statusCode, string reasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk, System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Memory GetMemory(int sizeHint = 0) { throw null; } - public System.Span GetSpan(int sizeHint = 0) { throw null; } - void Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter.Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } - System.Threading.Tasks.ValueTask Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputProducer.WriteChunkAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken) { throw null; } - public void Reset() { } - public System.Threading.Tasks.ValueTask Write100ContinueAsync() { throw null; } - public System.Threading.Tasks.Task WriteChunkAsync(System.ReadOnlySpan span, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.Task WriteDataAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask WriteDataToPipeAsync(System.ReadOnlySpan data, System.Threading.CancellationToken cancellationToken) { throw null; } - public void WriteResponseHeaders(int statusCode, string ReasonPhrase, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders responseHeaders, bool autoChunk) { } - public System.Threading.Tasks.ValueTask WriteRstStreamAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode error) { throw null; } - public System.Threading.Tasks.ValueTask WriteStreamSuffixAsync() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Http2PeerSetting - { - private readonly int _dummyPrimitive; - public Http2PeerSetting(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsParameter parameter, uint value) { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsParameter Parameter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public uint Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public partial class Http2PeerSettings - { - public const bool DefaultEnablePush = true; - public const uint DefaultHeaderTableSize = (uint)4096; - public const uint DefaultInitialWindowSize = (uint)65535; - public const uint DefaultMaxConcurrentStreams = (uint)4294967295; - public const uint DefaultMaxFrameSize = (uint)16384; - public const uint DefaultMaxHeaderListSize = (uint)4294967295; - public const uint MaxWindowSize = (uint)2147483647; - public Http2PeerSettings() { } - public bool EnablePush { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public uint HeaderTableSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public uint InitialWindowSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public uint MaxConcurrentStreams { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public uint MaxFrameSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public uint MaxHeaderListSize { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public void Update(System.Collections.Generic.IList settings) { } - } - [System.FlagsAttribute] - public enum Http2PingFrameFlags : byte - { - ACK = (byte)1, - NONE = (byte)0, - } - [System.FlagsAttribute] - public enum Http2SettingsFrameFlags : byte - { - ACK = (byte)1, - NONE = (byte)0, - } - public enum Http2SettingsParameter : ushort - { - SETTINGS_ENABLE_PUSH = (ushort)2, - SETTINGS_HEADER_TABLE_SIZE = (ushort)1, - SETTINGS_INITIAL_WINDOW_SIZE = (ushort)4, - SETTINGS_MAX_CONCURRENT_STREAMS = (ushort)3, - SETTINGS_MAX_FRAME_SIZE = (ushort)5, - SETTINGS_MAX_HEADER_LIST_SIZE = (ushort)6, - } - public partial class Http2SettingsParameterOutOfRangeException : System.Exception - { - public Http2SettingsParameterOutOfRangeException(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsParameter parameter, long lowerBound, long upperBound) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2SettingsParameter Parameter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public abstract partial class Http2Stream : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol, Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature, Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttp2StreamIdFeature, System.Threading.IThreadPoolWorkItem - { - public Http2Stream(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2StreamContext context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext)) { } - public bool EndStreamReceived { get { throw null; } } - public long? InputRemaining { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - Microsoft.AspNetCore.Http.IHeaderDictionary Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature.Trailers { get { throw null; } set { } } - int Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttp2StreamIdFeature.StreamId { get { throw null; } } - public bool ReceivedEmptyRequestBody { get { throw null; } } - public System.IO.Pipelines.Pipe RequestBodyPipe { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool RequestBodyStarted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int StreamId { get { throw null; } } - public void Abort(System.IO.IOException abortReason) { } - public void AbortRstStreamReceived() { } - protected override void ApplicationAbort() { } - protected override Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody CreateMessageBody() { throw null; } - protected override string CreateRequestId() { throw null; } - public abstract void Execute(); - public System.Threading.Tasks.Task OnDataAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame dataFrame, System.Buffers.ReadOnlySequence payload) { throw null; } - public void OnDataRead(int bytesRead) { } - public void OnEndStreamReceived() { } - protected override void OnErrorAfterResponseStarted() { } - protected override void OnRequestProcessingEnded() { } - protected override void OnReset() { } - protected override bool TryParseRequest(System.IO.Pipelines.ReadResult result, out bool endConnection) { throw null; } - public bool TryUpdateOutputWindow(int bytes) { throw null; } - } - public partial class Http2StreamContext : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionContext - { - public Http2StreamContext() { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2PeerSettings ClientPeerSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.InputFlowControl ConnectionInputFlowControl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControl ConnectionOutputFlowControl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter FrameWriter { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2PeerSettings ServerPeerSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public int StreamId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.IHttp2StreamLifetimeHandler StreamLifetimeHandler { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class Http2StreamErrorException : System.Exception - { - public Http2StreamErrorException(int streamId, string message, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode errorCode) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode ErrorCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int StreamId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public partial class Http2Stream : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream - { - public Http2Stream(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2StreamContext context) : base (default(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2StreamContext)) { } - public override void Execute() { } - } - public partial interface IHttp2StreamLifetimeHandler - { - void OnStreamCompleted(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Stream stream); - } - public partial class ThreadPoolAwaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - internal ThreadPoolAwaitable() { } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.ThreadPoolAwaitable Instance; - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.ThreadPoolAwaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl -{ - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct FlowControl - { - private int _dummyPrimitive; - public FlowControl(uint initialWindowSize) { throw null; } - public int Available { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool IsAborted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void Abort() { } - public void Advance(int bytes) { } - public bool TryUpdateWindow(int bytes) { throw null; } - } - public partial class InputFlowControl - { - public InputFlowControl(uint initialWindowSize, uint minWindowSizeIncrement) { } - public bool IsAvailabilityLow { get { throw null; } } - public int Abort() { throw null; } - public void StopWindowUpdates() { } - public bool TryAdvance(int bytes) { throw null; } - public bool TryUpdateWindow(int bytes, out int updateSize) { throw null; } - } - public partial class OutputFlowControl - { - public OutputFlowControl(uint initialWindowSize) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControlAwaitable AvailabilityAwaitable { get { throw null; } } - public int Available { get { throw null; } } - public bool IsAborted { get { throw null; } } - public void Abort() { } - public void Advance(int bytes) { } - public bool TryUpdateWindow(int bytes) { throw null; } - } - public partial class OutputFlowControlAwaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - public OutputFlowControlAwaitable() { } - public bool IsCompleted { get { throw null; } } - public void Complete() { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControlAwaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - public partial class StreamInputFlowControl - { - public StreamInputFlowControl(int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2FrameWriter frameWriter, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.InputFlowControl connectionLevelFlowControl, uint initialWindowSize, uint minWindowSizeIncrement) { } - public void Abort() { } - public void Advance(int bytes) { } - public void StopWindowUpdates() { } - public void UpdateWindows(int bytes) { } - } - public partial class StreamOutputFlowControl - { - public StreamOutputFlowControl(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControl connectionLevelFlowControl, uint initialWindowSize) { } - public int Available { get { throw null; } } - public bool IsAborted { get { throw null; } } - public void Abort() { } - public void Advance(int bytes) { } - public int AdvanceUpToAndWait(long bytes, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.OutputFlowControlAwaitable awaitable) { throw null; } - public bool TryUpdateWindow(int bytes) { throw null; } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack -{ - public partial class DynamicTable - { - public DynamicTable(int maxSize) { } - public int Count { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HeaderField this[int index] { get { throw null; } } - public int MaxSize { get { throw null; } } - public int Size { get { throw null; } } - public void Insert(System.Span name, System.Span value) { } - public void Resize(int maxSize) { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HeaderField - { - private readonly object _dummy; - public const int RfcOverhead = 32; - public HeaderField(System.Span name, System.Span value) { throw null; } - public int Length { get { throw null; } } - public byte[] Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public byte[] Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static int GetLength(int nameLength, int valueLength) { throw null; } - } - public partial class HPackDecoder - { - public HPackDecoder(int maxDynamicTableSize, int maxRequestHeaderFieldSize) { } - public void Decode(System.Buffers.ReadOnlySequence data, bool endHeaders, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler handler) { } - } - public partial class HPackDecodingException : System.Exception - { - public HPackDecodingException(string message) { } - public HPackDecodingException(string message, System.Exception innerException) { } - } - public partial class HPackEncoder - { - public HPackEncoder() { } - public bool BeginEncode(System.Collections.Generic.IEnumerable> headers, System.Span buffer, out int length) { throw null; } - public bool BeginEncode(int statusCode, System.Collections.Generic.IEnumerable> headers, System.Span buffer, out int length) { throw null; } - public bool Encode(System.Span buffer, out int length) { throw null; } - } - public partial class HPackEncodingException : System.Exception - { - public HPackEncodingException(string message) { } - public HPackEncodingException(string message, System.Exception innerException) { } - } - public partial class Huffman - { - public Huffman() { } - public static int Decode(System.ReadOnlySpan src, System.Span dst) { throw null; } - public static (uint encoded, int bitLength) Encode(int data) { throw null; } - } - public partial class HuffmanDecodingException : System.Exception - { - public HuffmanDecodingException(string message) { } - } - public partial class IntegerDecoder - { - public IntegerDecoder() { } - public bool BeginTryDecode(byte b, int prefixLength, out int result) { throw null; } - public static void ThrowIntegerTooBigException() { } - public bool TryDecode(byte b, out int result) { throw null; } - } - public static partial class IntegerEncoder - { - public static bool Encode(int i, int n, System.Span buffer, out int length) { throw null; } - } - public partial class StaticTable - { - internal StaticTable() { } - public int Count { get { throw null; } } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.StaticTable Instance { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HeaderField this[int index] { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary StatusIndex { get { throw null; } } - } - public static partial class StatusCodes - { - public static byte[] ToStatusBytes(int statusCode) { throw null; } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure -{ - public partial class BodyControl - { - public BodyControl(Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature bodyControl, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpResponseControl responseControl) { } - public void Abort(System.Exception error) { } - public (System.IO.Stream request, System.IO.Stream response, System.IO.Pipelines.PipeReader reader, System.IO.Pipelines.PipeWriter writer) Start(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody body) { throw null; } - public void Stop() { } - public System.IO.Stream Upgrade() { throw null; } - } - public partial class ConnectionManager - { - public ConnectionManager(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ResourceCounter upgradedConnections) { } - public ConnectionManager(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace, long? upgradedConnectionLimit) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ResourceCounter UpgradedConnectionCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void AddConnection(long id, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection connection) { } - public void RemoveConnection(long id) { } - public void Walk(System.Action callback) { } - } - public static partial class ConnectionManagerShutdownExtensions - { - [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task AbortAllConnectionsAsync(this Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ConnectionManager connectionManager) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task CloseAllConnectionsAsync(this Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ConnectionManager connectionManager, System.Threading.CancellationToken token) { throw null; } - } - public partial class ConnectionReference - { - public ConnectionReference(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection connection) { } - public string ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool TryGetConnection(out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection connection) { throw null; } - } - public partial class Disposable : System.IDisposable - { - public Disposable(System.Action dispose) { } - public void Dispose() { } - protected virtual void Dispose(bool disposing) { } - } - public partial class Heartbeat : System.IDisposable - { - public static readonly System.TimeSpan Interval; - public Heartbeat(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IHeartbeatHandler[] callbacks, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ISystemClock systemClock, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IDebugger debugger, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace) { } - public void Dispose() { } - public void Start() { } - } - public partial class HeartbeatManager : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IHeartbeatHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ISystemClock - { - public HeartbeatManager(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ConnectionManager connectionManager) { } - public System.DateTimeOffset UtcNow { get { throw null; } } - public long UtcNowTicks { get { throw null; } } - public System.DateTimeOffset UtcNowUnsynchronized { get { throw null; } } - public void OnHeartbeat(System.DateTimeOffset now) { } - } - public static partial class HttpUtilities - { - public const string Http10Version = "HTTP/1.0"; - public const string Http11Version = "HTTP/1.1"; - public const string Http2Version = "HTTP/2"; - public const string HttpsUriScheme = "https://"; - public const string HttpUriScheme = "http://"; - public static string GetAsciiOrUTF8StringNonNullCharacters(this System.Span span) { throw null; } - public static string GetAsciiStringEscaped(this System.Span span, int maxChars) { throw null; } - public static string GetAsciiStringNonNullCharacters(this System.Span span) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownHttpScheme(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpScheme knownScheme) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownMethod(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, out int length) { throw null; } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod GetKnownMethod(string value) { throw null; } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static bool GetKnownVersion(this System.Span span, out Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion knownVersion, out byte length) { throw null; } - public static bool IsHostHeaderValid(string hostText) { throw null; } - public static string MethodToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method) { throw null; } - public static string SchemeToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpScheme scheme) { throw null; } - public static string VersionToString(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion httpVersion) { throw null; } - } - public partial interface IDebugger - { - bool IsAttached { get; } - } - public partial interface IHeartbeatHandler - { - void OnHeartbeat(System.DateTimeOffset now); - } - public partial interface IKestrelTrace : Microsoft.Extensions.Logging.ILogger - { - void ApplicationAbortedConnection(string connectionId, string traceIdentifier); - void ApplicationError(string connectionId, string traceIdentifier, System.Exception ex); - void ApplicationNeverCompleted(string connectionId); - void ConnectionBadRequest(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException ex); - void ConnectionDisconnect(string connectionId); - void ConnectionHeadResponseBodyWrite(string connectionId, long count); - void ConnectionKeepAlive(string connectionId); - void ConnectionPause(string connectionId); - void ConnectionRejected(string connectionId); - void ConnectionResume(string connectionId); - void ConnectionStart(string connectionId); - void ConnectionStop(string connectionId); - void HeartbeatSlow(System.TimeSpan interval, System.DateTimeOffset now); - void HPackDecodingError(string connectionId, int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HPackDecodingException ex); - void HPackEncodingError(string connectionId, int streamId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack.HPackEncodingException ex); - void Http2ConnectionClosed(string connectionId, int highestOpenedStreamId); - void Http2ConnectionClosing(string connectionId); - void Http2ConnectionError(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ConnectionErrorException ex); - void Http2FrameReceived(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame); - void Http2FrameSending(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2Frame frame); - void Http2StreamError(string connectionId, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2StreamErrorException ex); - void Http2StreamResetAbort(string traceIdentifier, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode error, Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason); - void NotAllConnectionsAborted(); - void NotAllConnectionsClosedGracefully(); - void RequestBodyDone(string connectionId, string traceIdentifier); - void RequestBodyDrainTimedOut(string connectionId, string traceIdentifier); - void RequestBodyMinimumDataRateNotSatisfied(string connectionId, string traceIdentifier, double rate); - void RequestBodyNotEntirelyRead(string connectionId, string traceIdentifier); - void RequestBodyStart(string connectionId, string traceIdentifier); - void RequestProcessingError(string connectionId, System.Exception ex); - void ResponseMinimumDataRateNotSatisfied(string connectionId, string traceIdentifier); - } - public partial interface ISystemClock - { - System.DateTimeOffset UtcNow { get; } - long UtcNowTicks { get; } - System.DateTimeOffset UtcNowUnsynchronized { get; } - } - public partial interface ITimeoutControl - { - Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason TimerReason { get; } - void BytesRead(long count); - void BytesWrittenToBuffer(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate, long count); - void CancelTimeout(); - void InitializeHttp2(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.InputFlowControl connectionInputFlowControl); - void ResetTimeout(long ticks, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason timeoutReason); - void SetTimeout(long ticks, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason timeoutReason); - void StartRequestBody(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate); - void StartTimingRead(); - void StartTimingWrite(); - void StopRequestBody(); - void StopTimingRead(); - void StopTimingWrite(); - } - public partial interface ITimeoutHandler - { - void OnTimeout(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason reason); - } - public partial class KestrelConnection - { - public KestrelConnection(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection transportConnection) { } - public System.Threading.Tasks.Task ExecutionTask { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection TransportConnection { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.Diagnostics.Tracing.EventSourceAttribute(Name="Microsoft-AspNetCore-Server-Kestrel")] - public sealed partial class KestrelEventSource : System.Diagnostics.Tracing.EventSource - { - internal KestrelEventSource() { } - public static readonly Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelEventSource Log; - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)][System.Diagnostics.Tracing.EventAttribute(5, Level=System.Diagnostics.Tracing.EventLevel.Verbose)] - public void ConnectionRejected(string connectionId) { } - [System.Diagnostics.Tracing.NonEventAttribute] - public void ConnectionStart(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection connection) { } - [System.Diagnostics.Tracing.NonEventAttribute] - public void ConnectionStop(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection connection) { } - [System.Diagnostics.Tracing.NonEventAttribute] - public void RequestStart(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol httpProtocol) { } - [System.Diagnostics.Tracing.NonEventAttribute] - public void RequestStop(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol httpProtocol) { } - } - public abstract partial class ReadOnlyStream : System.IO.Stream - { - protected ReadOnlyStream() { } - public override bool CanRead { get { throw null; } } - public override bool CanWrite { get { throw null; } } - public override int WriteTimeout { get { throw null; } set { } } - public override void Write(byte[] buffer, int offset, int count) { } - public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public abstract partial class ResourceCounter - { - protected ResourceCounter() { } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ResourceCounter Unlimited { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ResourceCounter Quota(long amount) { throw null; } - public abstract void ReleaseOne(); - public abstract bool TryLockOne(); - } - public partial class ThrowingWasUpgradedWriteOnlyStream : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.WriteOnlyStream - { - public ThrowingWasUpgradedWriteOnlyStream() { } - public override bool CanSeek { get { throw null; } } - public override long Length { get { throw null; } } - public override long Position { get { throw null; } set { } } - public override void Flush() { } - public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } - public override void SetLength(long value) { } - public override void Write(byte[] buffer, int offset, int count) { } - public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public partial class TimeoutControl : Microsoft.AspNetCore.Server.Kestrel.Core.Features.IConnectionTimeoutFeature, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl - { - public TimeoutControl(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutHandler timeoutHandler) { } - public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason TimerReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void BytesRead(long count) { } - public void BytesWrittenToBuffer(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate, long count) { } - public void CancelTimeout() { } - public void InitializeHttp2(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl.InputFlowControl connectionInputFlowControl) { } - void Microsoft.AspNetCore.Server.Kestrel.Core.Features.IConnectionTimeoutFeature.ResetTimeout(System.TimeSpan timeSpan) { } - void Microsoft.AspNetCore.Server.Kestrel.Core.Features.IConnectionTimeoutFeature.SetTimeout(System.TimeSpan timeSpan) { } - public void ResetTimeout(long ticks, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason timeoutReason) { } - public void SetTimeout(long ticks, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TimeoutReason timeoutReason) { } - public void StartRequestBody(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate) { } - public void StartTimingRead() { } - public void StartTimingWrite() { } - public void StopRequestBody() { } - public void StopTimingRead() { } - public void StopTimingWrite() { } - public void Tick(System.DateTimeOffset now) { } - } - public static partial class TimeoutControlExtensions - { - public static void StartDrainTimeout(this Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl timeoutControl, Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minDataRate, long? maxResponseBufferSize) { } - } - public enum TimeoutReason - { - KeepAlive = 1, - None = 0, - ReadDataRate = 3, - RequestBodyDrain = 5, - RequestHeaders = 2, - TimeoutFeature = 6, - WriteDataRate = 4, - } - public partial class TimingPipeFlusher - { - public TimingPipeFlusher(System.IO.Pipelines.PipeWriter writer, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ITimeoutControl timeoutControl, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace log) { } - public System.Threading.Tasks.ValueTask FlushAsync() { throw null; } - public System.Threading.Tasks.ValueTask FlushAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter outputAborter, System.Threading.CancellationToken cancellationToken) { throw null; } - public System.Threading.Tasks.ValueTask FlushAsync(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate, long count) { throw null; } - public System.Threading.Tasks.ValueTask FlushAsync(Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate minRate, long count, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpOutputAborter outputAborter, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public abstract partial class WriteOnlyStream : System.IO.Stream - { - protected WriteOnlyStream() { } - public override bool CanRead { get { throw null; } } - public override bool CanWrite { get { throw null; } } - public override int ReadTimeout { get { throw null; } set { } } - public override int Read(byte[] buffer, int offset, int count) { throw null; } - public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } - } -} namespace Microsoft.AspNetCore.Server.Kestrel.Https { public enum ClientCertificateMode @@ -1832,11 +236,4 @@ public static partial class CertificateLoader { public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadFromStoreCert(string subject, string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, bool allowInvalid) { throw null; } } - public partial class HttpsConnectionAdapter : Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.IConnectionAdapter - { - public HttpsConnectionAdapter(Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions options) { } - public HttpsConnectionAdapter(Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public bool IsHttps { get { throw null; } } - public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.ConnectionAdapterContext context) { throw null; } - } } diff --git a/src/Servers/Kestrel/Core/src/Adapter/Internal/AdaptedPipeline.cs b/src/Servers/Kestrel/Core/src/Adapter/Internal/AdaptedPipeline.cs index 4b591a717d58..8d9a35b45639 100644 --- a/src/Servers/Kestrel/Core/src/Adapter/Internal/AdaptedPipeline.cs +++ b/src/Servers/Kestrel/Core/src/Adapter/Internal/AdaptedPipeline.cs @@ -5,14 +5,13 @@ using System.IO; using System.IO.Pipelines; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal { - public class AdaptedPipeline : IDuplexPipe + internal class AdaptedPipeline : IDuplexPipe { private static readonly int MinAllocBufferSize = KestrelMemoryPool.MinimumSegmentSize / 2; diff --git a/src/Servers/Kestrel/Core/src/Adapter/Internal/LoggingConnectionAdapter.cs b/src/Servers/Kestrel/Core/src/Adapter/Internal/LoggingConnectionAdapter.cs index 1afd32d1d694..c69aca5d62da 100644 --- a/src/Servers/Kestrel/Core/src/Adapter/Internal/LoggingConnectionAdapter.cs +++ b/src/Servers/Kestrel/Core/src/Adapter/Internal/LoggingConnectionAdapter.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal { - public class LoggingConnectionAdapter : IConnectionAdapter + internal class LoggingConnectionAdapter : IConnectionAdapter { private readonly ILogger _logger; diff --git a/src/Servers/Kestrel/Core/src/Adapter/Internal/RawStream.cs b/src/Servers/Kestrel/Core/src/Adapter/Internal/RawStream.cs index 837bc8ec0598..2875d0ad13a1 100644 --- a/src/Servers/Kestrel/Core/src/Adapter/Internal/RawStream.cs +++ b/src/Servers/Kestrel/Core/src/Adapter/Internal/RawStream.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal { - public class RawStream : Stream + internal class RawStream : Stream { private readonly PipeReader _input; private readonly PipeWriter _output; diff --git a/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs b/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs index 7324335665a6..9501fe7e08c3 100644 --- a/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs +++ b/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics; @@ -42,10 +42,8 @@ internal static void Throw(RequestRejectionReason reason) } [StackTraceHidden] -#pragma warning disable PUB0001 // Pubternal type in public API - public static void Throw(RequestRejectionReason reason, HttpMethod method) + internal static void Throw(RequestRejectionReason reason, HttpMethod method) => throw GetException(reason, method.ToString().ToUpperInvariant()); -#pragma warning restore PUB0001 // Pubternal type in public API [MethodImpl(MethodImplOptions.NoInlining)] internal static BadHttpRequestException GetException(RequestRejectionReason reason) @@ -175,4 +173,4 @@ internal static BadHttpRequestException GetException(RequestRejectionReason reas return ex; } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Core/src/Internal/CertificateLoader.cs b/src/Servers/Kestrel/Core/src/CertificateLoader.cs similarity index 98% rename from src/Servers/Kestrel/Core/src/Internal/CertificateLoader.cs rename to src/Servers/Kestrel/Core/src/CertificateLoader.cs index ce9c17e3405c..424dfb25ec3f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/CertificateLoader.cs +++ b/src/Servers/Kestrel/Core/src/CertificateLoader.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; diff --git a/src/Servers/Kestrel/Core/src/Internal/ConnectionDispatcher.cs b/src/Servers/Kestrel/Core/src/Internal/ConnectionDispatcher.cs index f6b77155bf80..0e0108417be6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/ConnectionDispatcher.cs +++ b/src/Servers/Kestrel/Core/src/Internal/ConnectionDispatcher.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class ConnectionDispatcher : IConnectionDispatcher + internal class ConnectionDispatcher : IConnectionDispatcher { private static long _lastConnectionId = long.MinValue; diff --git a/src/Servers/Kestrel/Core/src/Internal/ConnectionLimitMiddleware.cs b/src/Servers/Kestrel/Core/src/Internal/ConnectionLimitMiddleware.cs index 5be3d5479a4d..c999063f1258 100644 --- a/src/Servers/Kestrel/Core/src/Internal/ConnectionLimitMiddleware.cs +++ b/src/Servers/Kestrel/Core/src/Internal/ConnectionLimitMiddleware.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Threading.Tasks; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class ConnectionLimitMiddleware + internal class ConnectionLimitMiddleware { private readonly ConnectionDelegate _next; private readonly ResourceCounter _concurrentConnectionCounter; diff --git a/src/Servers/Kestrel/Core/src/Internal/ConnectionLogScope.cs b/src/Servers/Kestrel/Core/src/Internal/ConnectionLogScope.cs index 3d1b882e8212..5adaca1dec9c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/ConnectionLogScope.cs +++ b/src/Servers/Kestrel/Core/src/Internal/ConnectionLogScope.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class ConnectionLogScope : IReadOnlyList> + internal class ConnectionLogScope : IReadOnlyList> { private readonly string _connectionId; diff --git a/src/Servers/Kestrel/Core/src/Internal/DuplexPipe.cs b/src/Servers/Kestrel/Core/src/Internal/DuplexPipe.cs index 7426ebf1fe1d..1c5896fc0d15 100644 --- a/src/Servers/Kestrel/Core/src/Internal/DuplexPipe.cs +++ b/src/Servers/Kestrel/Core/src/Internal/DuplexPipe.cs @@ -1,4 +1,7 @@ -namespace System.IO.Pipelines +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace System.IO.Pipelines { internal class DuplexPipe : IDuplexPipe { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/ConnectionOptions.cs b/src/Servers/Kestrel/Core/src/Internal/Http/ConnectionOptions.cs index 71817aed69e2..fdac9e24d68d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/ConnectionOptions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/ConnectionOptions.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { [Flags] - public enum ConnectionOptions + internal enum ConnectionOptions { None = 0, Close = 1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/DateHeaderValueManager.cs b/src/Servers/Kestrel/Core/src/Internal/Http/DateHeaderValueManager.cs index 61889b1b2441..371033b3302e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/DateHeaderValueManager.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/DateHeaderValueManager.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http /// /// Manages the generation of the date header value. /// - public class DateHeaderValueManager : IHeartbeatHandler + internal class DateHeaderValueManager : IHeartbeatHandler { private static readonly byte[] _datePreambleBytes = Encoding.ASCII.GetBytes("\r\nDate: "); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ChunkedEncodingMessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ChunkedEncodingMessageBody.cs index 2189bc4419fb..6de433251c73 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ChunkedEncodingMessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ChunkedEncodingMessageBody.cs @@ -9,7 +9,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http @@ -17,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http /// /// http://tools.ietf.org/html/rfc2616#section-3.6.1 /// - public class Http1ChunkedEncodingMessageBody : Http1MessageBody + internal class Http1ChunkedEncodingMessageBody : Http1MessageBody { // byte consts don't have a data type annotation so we pre-cast it private const byte ByteCR = (byte)'\r'; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.FeatureCollection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.FeatureCollection.cs index 0a5c1dd2472d..da4bacf8c014 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.FeatureCollection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.FeatureCollection.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class Http1Connection : IHttpMinRequestBodyDataRateFeature, + internal partial class Http1Connection : IHttpMinRequestBodyDataRateFeature, IHttpMinResponseDataRateFeature { MinDataRate IHttpMinRequestBodyDataRateFeature.MinDataRate diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs index f418b475b7aa..d2cdb573828f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs @@ -11,11 +11,10 @@ using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; -using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class Http1Connection : HttpProtocol, IRequestProcessor + internal partial class Http1Connection : HttpProtocol, IRequestProcessor { private const byte ByteAsterisk = (byte)'*'; private const byte ByteForwardSlash = (byte)'/'; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs index 289ecac406f2..b71cacae7cba 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public class Http1ContentLengthMessageBody : Http1MessageBody + internal class Http1ContentLengthMessageBody : Http1MessageBody { private readonly long _contentLength; private long _inputLength; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs index 71c346897081..702b4f3b98f7 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public abstract class Http1MessageBody : MessageBody + internal abstract class Http1MessageBody : MessageBody { protected readonly Http1Connection _context; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs index f620a4be1e10..17e32d8206a8 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public class Http1OutputProducer : IHttpOutputProducer, IHttpOutputAborter, IDisposable + internal class Http1OutputProducer : IHttpOutputProducer, IHttpOutputAborter, IDisposable { // Use C#7.3's ReadOnlySpan optimization for static data https://vcsjones.com/2019/02/01/csharp-readonly-span-bytes-static/ // "HTTP/1.1 100 Continue\r\n\r\n" diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ParsingHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ParsingHandler.cs index 6c2099eade62..a7d6fdddc750 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1ParsingHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1ParsingHandler.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public readonly struct Http1ParsingHandler : IHttpRequestLineHandler, IHttpHeadersHandler + internal readonly struct Http1ParsingHandler : IHttpRequestLineHandler, IHttpHeadersHandler { public readonly Http1Connection Connection; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1UpgradeMessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1UpgradeMessageBody.cs index 1fcf18c37c43..a19756169857 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1UpgradeMessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1UpgradeMessageBody.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http /// The upgrade stream uses the raw connection stream instead of going through the RequestBodyPipe. This /// removes the redundant copy from the transport pipe to the body pipe. /// - public class Http1UpgradeMessageBody : Http1MessageBody + internal class Http1UpgradeMessageBody : Http1MessageBody { public bool _completed; public Http1UpgradeMessageBody(Http1Connection context) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs index e520fd6ec7c6..dc7244b43cc5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class HttpRequestHeaders + internal partial class HttpRequestHeaders { private long _bits = 0; @@ -4705,7 +4705,7 @@ public bool MoveNext() } } - public partial class HttpResponseHeaders + internal partial class HttpResponseHeaders { private static ReadOnlySpan HeaderBytes => new byte[] { @@ -8531,7 +8531,7 @@ public bool MoveNext() } } - public partial class HttpResponseTrailers + internal partial class HttpResponseTrailers { private static ReadOnlySpan HeaderBytes => new byte[] { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs index 250979aeb0af..3b9b281dde8d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public abstract class HttpHeaders : IHeaderDictionary + internal abstract class HttpHeaders : IHeaderDictionary { protected long? _contentLength; protected bool _isReadOnly; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpMethod.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpMethod.cs index 3e6ff0667e2b..dd2caec33d85 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpMethod.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpMethod.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum HttpMethod: byte + internal enum HttpMethod: byte { Get, Put, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs index 3010aecc6173..5560eacfcde0 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public class HttpParser : IHttpParser where TRequestHandler : IHttpHeadersHandler, IHttpRequestLineHandler + internal class HttpParser : IHttpParser where TRequestHandler : IHttpHeadersHandler, IHttpRequestLineHandler { private bool _showErrorDetails; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.FeatureCollection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.FeatureCollection.cs index b50127ba90cb..ea4d2cad0901 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.FeatureCollection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.FeatureCollection.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.IO.Pipelines; using System.Net; @@ -17,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class HttpProtocol : IHttpRequestFeature, + internal partial class HttpProtocol : IHttpRequestFeature, IHttpResponseFeature, IResponseBodyPipeFeature, IRequestBodyPipeFeature, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs index aec1e2318f4b..bd0edf1357c8 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class HttpProtocol : IFeatureCollection + internal partial class HttpProtocol : IFeatureCollection { private static readonly Type IHttpRequestFeatureType = typeof(IHttpRequestFeature); private static readonly Type IHttpResponseFeatureType = typeof(IHttpResponseFeature); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs index 9cb304c270a9..8fec2adc0373 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public abstract partial class HttpProtocol : IDefaultHttpContextContainer, IHttpResponseControl + internal abstract partial class HttpProtocol : IDefaultHttpContextContainer, IHttpResponseControl { private static readonly byte[] _bytesConnectionClose = Encoding.ASCII.GetBytes("\r\nConnection: close"); private static readonly byte[] _bytesConnectionKeepAlive = Encoding.ASCII.GetBytes("\r\nConnection: keep-alive"); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestHeaders.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestHeaders.cs index 9eca41a7c9c8..8691f7ef67e5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestHeaders.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestHeaders.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public sealed partial class HttpRequestHeaders : HttpHeaders + internal sealed partial class HttpRequestHeaders : HttpHeaders { private static long ParseContentLength(string value) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestPipeReader.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestPipeReader.cs index b7bce1a005c6..02e5bf364899 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestPipeReader.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestPipeReader.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http /// /// Default HttpRequest PipeReader implementation to be used by Kestrel. /// - public class HttpRequestPipeReader : PipeReader + internal class HttpRequestPipeReader : PipeReader { private MessageBody _body; private HttpStreamState _state; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestTargetForm.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestTargetForm.cs index 0e43670fa33a..04db4a0c2a32 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestTargetForm.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestTargetForm.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum HttpRequestTarget + internal enum HttpRequestTarget { Unknown = -1, // origin-form is the most common diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseHeaders.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseHeaders.cs index 70ecc2f1427c..c613524a5716 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseHeaders.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseHeaders.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public sealed partial class HttpResponseHeaders : HttpHeaders + internal sealed partial class HttpResponseHeaders : HttpHeaders { private static ReadOnlySpan _CrLf => new[] { (byte)'\r', (byte)'\n' }; private static ReadOnlySpan _colonSpace => new[] { (byte)':', (byte)' ' }; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs index 2a406b067f86..dc37670c61d5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponsePipeWriter.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public class HttpResponsePipeWriter : PipeWriter + internal class HttpResponsePipeWriter : PipeWriter { private HttpStreamState _state; private readonly IHttpResponseControl _pipeControl; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseTrailers.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseTrailers.cs index 5c9d0c3d4b33..61b6646c8c79 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseTrailers.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseTrailers.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public partial class HttpResponseTrailers : HttpHeaders + internal partial class HttpResponseTrailers : HttpHeaders { public Enumerator GetEnumerator() { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpScheme.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpScheme.cs index dfd4642f3d50..3bf3d6339fcf 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpScheme.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpScheme.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum HttpScheme + internal enum HttpScheme { Unknown = -1, Http = 0, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpStreamState.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpStreamState.cs index 34d5e904f588..4389ef58bf80 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpStreamState.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpStreamState.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - enum HttpStreamState + internal enum HttpStreamState { Open, Closed, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpVersion.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpVersion.cs index 832a1c56165f..a460904ec87f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpVersion.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpVersion.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum HttpVersion + internal enum HttpVersion { Unknown = -1, Http10 = 0, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpHeadersHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpHeadersHandler.cs index 9a322f0da9a8..48734fc0c334 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpHeadersHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpHeadersHandler.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpHeadersHandler + internal interface IHttpHeadersHandler { void OnHeader(Span name, Span value); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputAborter.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputAborter.cs index ba0d2cb123b4..6f642bc7aebe 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputAborter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputAborter.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpOutputAborter + internal interface IHttpOutputAborter { void Abort(ConnectionAbortedException abortReason); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs index bcdcd8dd102d..3b0ffa31cce3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpOutputProducer.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpOutputProducer + internal interface IHttpOutputProducer { ValueTask WriteChunkAsync(ReadOnlySpan data, CancellationToken cancellationToken); ValueTask FlushAsync(CancellationToken cancellationToken); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpParser.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpParser.cs index efd8e9445baf..fc56983a33fe 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpParser.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpParser.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpParser where TRequestHandler : IHttpHeadersHandler, IHttpRequestLineHandler + internal interface IHttpParser where TRequestHandler : IHttpHeadersHandler, IHttpRequestLineHandler { bool ParseRequestLine(TRequestHandler handler, in ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpRequestLineHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpRequestLineHandler.cs index ac91138512fb..b15931ae8488 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpRequestLineHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpRequestLineHandler.cs @@ -5,8 +5,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpRequestLineHandler + internal interface IHttpRequestLineHandler { void OnStartLine(HttpMethod method, HttpVersion version, Span target, Span path, Span query, Span customMethod, bool pathEncoded); } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs index 6ef2b4339d66..9ed896a684f0 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponseControl.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpResponseControl + internal interface IHttpResponseControl { void ProduceContinue(); Memory GetMemory(int sizeHint = 0); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponsePipeWriterControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponsePipeWriterControl.cs index eafafbad7db7..c816acc5a4b3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponsePipeWriterControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/IHttpResponsePipeWriterControl.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public interface IHttpResponsePipeWriterControl + internal interface IHttpResponsePipeWriterControl { void ProduceContinue(); Memory GetMemory(int sizeHint = 0); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/MessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/MessageBody.cs index 159daffcd085..e4d38f8c31be 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/MessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/MessageBody.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public abstract class MessageBody + internal abstract class MessageBody { private static readonly MessageBody _zeroContentLengthClose = new ZeroContentLengthMessageBody(keepAlive: false); private static readonly MessageBody _zeroContentLengthKeepAlive = new ZeroContentLengthMessageBody(keepAlive: true); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/PathNormalizer.cs b/src/Servers/Kestrel/Core/src/Internal/Http/PathNormalizer.cs index c5059bdac7af..90faa1213197 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/PathNormalizer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/PathNormalizer.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public static class PathNormalizer + internal static class PathNormalizer { private const byte ByteSlash = (byte)'/'; private const byte ByteDot = (byte)'.'; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/PipelineExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/Http/PipelineExtensions.cs index debfb7e9273b..d98768bd1dc3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/PipelineExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/PipelineExtensions.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public static class PipelineExtensions + internal static class PipelineExtensions { private const int _maxULongByteLength = 20; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/ProduceEndType.cs b/src/Servers/Kestrel/Core/src/Internal/Http/ProduceEndType.cs index 72107f90e73a..5b237e93f8d4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/ProduceEndType.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/ProduceEndType.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum ProduceEndType + internal enum ProduceEndType { SocketShutdown, SocketDisconnect, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/ReasonPhrases.cs b/src/Servers/Kestrel/Core/src/Internal/Http/ReasonPhrases.cs index d372113bda7c..007889656145 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/ReasonPhrases.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/ReasonPhrases.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public static class ReasonPhrases + internal static class ReasonPhrases { private static readonly byte[] _bytesStatus100 = CreateStatusBytes(StatusCodes.Status100Continue); private static readonly byte[] _bytesStatus101 = CreateStatusBytes(StatusCodes.Status101SwitchingProtocols); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/RequestProcessingStatus.cs b/src/Servers/Kestrel/Core/src/Internal/Http/RequestProcessingStatus.cs index d32e4e3f9b19..61832dc34bdf 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/RequestProcessingStatus.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/RequestProcessingStatus.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum RequestProcessingStatus + internal enum RequestProcessingStatus { RequestPending, ParsingRequestLine, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs b/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs index ee27b5cb9634..fce21b621062 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public enum RequestRejectionReason + internal enum RequestRejectionReason { UnrecognizedHTTPVersion, InvalidRequestLine, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/TransferCoding.cs b/src/Servers/Kestrel/Core/src/Internal/Http/TransferCoding.cs index 39c52ba6aa0f..411c4c62443d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/TransferCoding.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/TransferCoding.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { [Flags] - public enum TransferCoding + internal enum TransferCoding { None, Chunked, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/ZeroContentLengthMessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/ZeroContentLengthMessageBody.cs index 355f534be02b..ab88b1e80e1d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/ZeroContentLengthMessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/ZeroContentLengthMessageBody.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { - public class ZeroContentLengthMessageBody : MessageBody + internal class ZeroContentLengthMessageBody : MessageBody { public ZeroContentLengthMessageBody(bool keepAlive) : base(null, null) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/FlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/FlowControl.cs index 779f9a988630..e5ba460f1143 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/FlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/FlowControl.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public struct FlowControl + internal struct FlowControl { public FlowControl(uint initialWindowSize) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs index e43d290ce65c..7231f882b73d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public class InputFlowControl + internal class InputFlowControl { private readonly int _initialWindowSize; private readonly int _minWindowSizeIncrement; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControl.cs index 5b3282a55240..609398d3d709 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControl.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Collections.Generic; @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public class OutputFlowControl + internal class OutputFlowControl { private FlowControl _flow; private Queue _awaitableQueue; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControlAwaitable.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControlAwaitable.cs index 48d15e345f32..e9e44ab3ba0e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControlAwaitable.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/OutputFlowControlAwaitable.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public class OutputFlowControlAwaitable : ICriticalNotifyCompletion + internal class OutputFlowControlAwaitable : ICriticalNotifyCompletion { private static readonly Action _callbackCompleted = () => { }; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamInputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamInputFlowControl.cs index 4ee1d0238cda..afcd4219dc73 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamInputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamInputFlowControl.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public class StreamInputFlowControl + internal class StreamInputFlowControl { private readonly InputFlowControl _connectionLevelFlowControl; private readonly InputFlowControl _streamLevelFlowControl; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamOutputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamOutputFlowControl.cs index 99e58077fd7a..35dccd92fc51 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamOutputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/StreamOutputFlowControl.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.FlowControl { - public class StreamOutputFlowControl + internal class StreamOutputFlowControl { private readonly OutputFlowControl _connectionLevelFlowControl; private readonly OutputFlowControl _streamLevelFlowControl; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/DynamicTable.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/DynamicTable.cs index 6a13e49b8214..a2181711a091 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/DynamicTable.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/DynamicTable.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class DynamicTable + internal class DynamicTable { private HeaderField[] _buffer; private int _maxSize; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecoder.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecoder.cs index 3decfb4c0809..4f644db63df6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecoder.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecoder.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class HPackDecoder + internal class HPackDecoder { private enum State { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecodingException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecodingException.cs index 7ae0ddddf5ee..bb9d46aa2583 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecodingException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackDecodingException.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class HPackDecodingException : Exception + internal class HPackDecodingException : Exception { public HPackDecodingException(string message) : base(message) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncoder.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncoder.cs index a474f975e125..9268061b2854 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncoder.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncoder.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class HPackEncoder + internal class HPackEncoder { private IEnumerator> _enumerator; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncodingException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncodingException.cs index ded6cb50df51..d1ef84dc7558 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncodingException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HPackEncodingException.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class HPackEncodingException : Exception + internal class HPackEncodingException : Exception { public HPackEncodingException(string message) : base(message) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HeaderField.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HeaderField.cs index 892a617df9e0..d6a07e7b35d3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HeaderField.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HeaderField.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public readonly struct HeaderField + internal readonly struct HeaderField { // http://httpwg.org/specs/rfc7541.html#rfc.section.4.1 public const int RfcOverhead = 32; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/Huffman.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/Huffman.cs index 15f4d0bf50c5..fed5481d305c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/Huffman.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/Huffman.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class Huffman + internal class Huffman { // TODO: this can be constructed from _decodingTable private static readonly (uint code, int bitLength)[] _encodingTable = new (uint code, int bitLength)[] diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HuffmanDecodingException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HuffmanDecodingException.cs index 3bd992ab4b52..43b324d94fbf 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HuffmanDecodingException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/HuffmanDecodingException.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class HuffmanDecodingException : Exception + internal class HuffmanDecodingException : Exception { public HuffmanDecodingException(string message) : base(message) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerDecoder.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerDecoder.cs index 4805993b6f1a..081fd30f6c49 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerDecoder.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerDecoder.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack /// /// The maximum we will decode is Int32.MaxValue, which is also the maximum request header field size. /// - public class IntegerDecoder + internal class IntegerDecoder { private int _i; private int _m; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerEncoder.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerEncoder.cs index 6385459d140b..63da553db2a7 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerEncoder.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/IntegerEncoder.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public static class IntegerEncoder + internal static class IntegerEncoder { public static bool Encode(int i, int n, Span buffer, out int length) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StaticTable.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StaticTable.cs index 0b8b533bb4a7..5c0ece5c9f1a 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StaticTable.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StaticTable.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public class StaticTable + internal class StaticTable { private static readonly StaticTable _instance = new StaticTable(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StatusCodes.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StatusCodes.cs index 056d5a8a1af7..35d90e796ca2 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StatusCodes.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/HPack/StatusCodes.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack { - public static class StatusCodes + internal static class StatusCodes { private static readonly byte[] _bytesStatus100 = CreateStatusBytes(Microsoft.AspNetCore.Http.StatusCodes.Status100Continue); private static readonly byte[] _bytesStatus101 = CreateStatusBytes(Microsoft.AspNetCore.Http.StatusCodes.Status101SwitchingProtocols); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index c2b4ffc494ef..9f42f5545f55 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeadersHandler, IRequestProcessor + internal class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeadersHandler, IRequestProcessor { public static byte[] ClientPreface { get; } = Encoding.ASCII.GetBytes("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ConnectionErrorException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ConnectionErrorException.cs index dd1314b1a5db..58556dd62c6c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ConnectionErrorException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ConnectionErrorException.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2ConnectionErrorException : Exception + internal class Http2ConnectionErrorException : Exception { public Http2ConnectionErrorException(string message, Http2ErrorCode errorCode) : base($"HTTP/2 connection error ({errorCode}): {message}") diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ContinuationFrameFlags.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ContinuationFrameFlags.cs index 65e65bc0bc38..df6d3244637c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ContinuationFrameFlags.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ContinuationFrameFlags.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { [Flags] - public enum Http2ContinuationFrameFlags : byte + internal enum Http2ContinuationFrameFlags : byte { NONE = 0x0, END_HEADERS = 0x4, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2DataFrameFlags.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2DataFrameFlags.cs index 735a4aea30ae..2bcfd42e6d4b 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2DataFrameFlags.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2DataFrameFlags.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { [Flags] - public enum Http2DataFrameFlags : byte + internal enum Http2DataFrameFlags : byte { NONE = 0x0, END_STREAM = 0x1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ErrorCode.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ErrorCode.cs index 401350fb392c..b13f522ad5c8 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ErrorCode.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2ErrorCode.cs @@ -4,7 +4,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public enum Http2ErrorCode : uint + internal enum Http2ErrorCode : uint { NO_ERROR = 0x0, PROTOCOL_ERROR = 0x1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Continuation.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Continuation.cs index d971385b9599..407a0d1770ba 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Continuation.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Continuation.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Header Block Fragment (*) ... +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2ContinuationFrameFlags ContinuationFlags { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Data.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Data.cs index 93765602e057..b122e583e086 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Data.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Data.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Padding (*) ... +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2DataFrameFlags DataFlags { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.GoAway.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.GoAway.cs index cb0aa225014a..6e5292f1c5bb 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.GoAway.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.GoAway.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Additional Debug Data (*) | +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public int GoAwayLastStreamId { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Headers.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Headers.cs index 16f369570e57..bf5fb386e5f5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Headers.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Headers.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Padding (*) ... +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2HeadersFrameFlags HeadersFlags { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Ping.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Ping.cs index 2c69de1b213a..d8e51b867fa2 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Ping.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Ping.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | | +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2PingFrameFlags PingFlags { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Priority.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Priority.cs index 4c293e9de6ad..1dccf9724f3d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Priority.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Priority.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Weight (8) | +-+-------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public int PriorityStreamDependency { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.RstStream.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.RstStream.cs index 98a8fa22caa4..4e542bdb7f52 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.RstStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.RstStream.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Error Code (32) | +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2ErrorCode RstStreamErrorCode { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Settings.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Settings.cs index b8f3ffe198e8..30298a14aff6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Settings.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.Settings.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Value (32) | +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public Http2SettingsFrameFlags SettingsFlags { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.WindowUpdate.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.WindowUpdate.cs index 404de2c44617..94647815c80f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.WindowUpdate.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.WindowUpdate.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 |R| Window Size Increment (31) | +-+-------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public int WindowUpdateSizeIncrement { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.cs index 9880572ed951..d892d19fa2c1 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Frame.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 | Frame Payload (0...) ... +---------------------------------------------------------------+ */ - public partial class Http2Frame + internal partial class Http2Frame { public int PayloadLength { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameReader.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameReader.cs index 0bc2617ac3cb..4b6f67bf465b 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameReader.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameReader.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public static class Http2FrameReader + internal static class Http2FrameReader { /* https://tools.ietf.org/html/rfc7540#section-4.1 +-----------------------------------------------+ diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameType.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameType.cs index a09272a6be71..c52d1262f674 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameType.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameType.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public enum Http2FrameType : byte + internal enum Http2FrameType : byte { DATA = 0x0, HEADERS = 0x1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs index 8c794b1f9d47..8fff9860baa3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2FrameWriter + internal class Http2FrameWriter { // Literal Header Field without Indexing - Indexed Name (Index 8 - :status) private static ReadOnlySpan _continueBytes => new byte[] { 0x08, 0x03, (byte)'1', (byte)'0', (byte)'0' }; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2HeadersFrameFlags.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2HeadersFrameFlags.cs index 564371e1bec0..146c4a20ed34 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2HeadersFrameFlags.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2HeadersFrameFlags.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { [Flags] - public enum Http2HeadersFrameFlags : byte + internal enum Http2HeadersFrameFlags : byte { NONE = 0x0, END_STREAM = 0x1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2MessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2MessageBody.cs index 1ba455228019..e77b5c2fad55 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2MessageBody.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2MessageBody.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2MessageBody : MessageBody + internal class Http2MessageBody : MessageBody { private readonly Http2Stream _context; private ReadResult _readResult; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs index c454b465b0b5..4ac56092bce3 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2OutputProducer.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2OutputProducer : IHttpOutputProducer, IHttpOutputAborter + internal class Http2OutputProducer : IHttpOutputProducer, IHttpOutputAborter { private readonly int _streamId; private readonly Http2FrameWriter _frameWriter; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSetting.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSetting.cs index 90cfd223b275..ba0fc182c575 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSetting.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSetting.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public readonly struct Http2PeerSetting + internal readonly struct Http2PeerSetting { public Http2PeerSetting(Http2SettingsParameter parameter, uint value) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSettings.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSettings.cs index 129fc3e80d2b..9496f97d08aa 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSettings.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PeerSettings.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2PeerSettings + internal class Http2PeerSettings { // Note these are protocol defaults, not Kestrel defaults. public const uint DefaultHeaderTableSize = 4096; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PingFrameFlags.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PingFrameFlags.cs index da5163f7e7bd..9a809e92399e 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PingFrameFlags.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2PingFrameFlags.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { [Flags] - public enum Http2PingFrameFlags : byte + internal enum Http2PingFrameFlags : byte { NONE = 0x0, ACK = 0x1 diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsFrameFlags.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsFrameFlags.cs index 5b0b8666cdcf..721872a80a1c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsFrameFlags.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsFrameFlags.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { [Flags] - public enum Http2SettingsFrameFlags : byte + internal enum Http2SettingsFrameFlags : byte { NONE = 0x0, ACK = 0x1, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameter.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameter.cs index 918422a4c2d5..495c92993797 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameter.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public enum Http2SettingsParameter : ushort + internal enum Http2SettingsParameter : ushort { SETTINGS_HEADER_TABLE_SIZE = 0x1, SETTINGS_ENABLE_PUSH = 0x2, diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameterOutOfRangeException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameterOutOfRangeException.cs index fcaca923b041..48cde17a80c6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameterOutOfRangeException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2SettingsParameterOutOfRangeException.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2SettingsParameterOutOfRangeException : Exception + internal class Http2SettingsParameterOutOfRangeException : Exception { public Http2SettingsParameterOutOfRangeException(Http2SettingsParameter parameter, long lowerBound, long upperBound) : base($"HTTP/2 SETTINGS parameter {parameter} must be set to a value between {lowerBound} and {upperBound}") diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.FeatureCollection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.FeatureCollection.cs index 72604950585b..4af0269f4c59 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.FeatureCollection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.FeatureCollection.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public partial class Http2Stream : IHttp2StreamIdFeature, IHttpResponseTrailersFeature + internal partial class Http2Stream : IHttp2StreamIdFeature, IHttpResponseTrailersFeature { internal HttpResponseTrailers Trailers { get; set; } private IHeaderDictionary _userTrailers; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs index 5b4c6f600596..cca143cfbd22 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public abstract partial class Http2Stream : HttpProtocol, IThreadPoolWorkItem + internal abstract partial class Http2Stream : HttpProtocol, IThreadPoolWorkItem { private readonly Http2StreamContext _context; private readonly Http2OutputProducer _http2Output; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamContext.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamContext.cs index 7cb87da4f80a..85646a2bfb39 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamContext.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamContext.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2StreamContext : HttpConnectionContext + internal class Http2StreamContext : HttpConnectionContext { public int StreamId { get; set; } public IHttp2StreamLifetimeHandler StreamLifetimeHandler { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamErrorException.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamErrorException.cs index 2f63df1412a6..c463111e6915 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamErrorException.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamErrorException.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2StreamErrorException : Exception + internal class Http2StreamErrorException : Exception { public Http2StreamErrorException(int streamId, string message, Http2ErrorCode errorCode) : base($"HTTP/2 stream ID {streamId} error ({errorCode}): {message}") diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamOfT.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamOfT.cs index d026b3a28884..b408e27114f4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamOfT.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2StreamOfT.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class Http2Stream : Http2Stream + internal class Http2Stream : Http2Stream { private readonly IHttpApplication _application; diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/IHttp2StreamLifetimeHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/IHttp2StreamLifetimeHandler.cs index b81b6ca5aa80..d838d48a85ea 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/IHttp2StreamLifetimeHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/IHttp2StreamLifetimeHandler.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public interface IHttp2StreamLifetimeHandler + internal interface IHttp2StreamLifetimeHandler { void OnStreamCompleted(Http2Stream stream); } diff --git a/src/Servers/Kestrel/Core/src/Internal/HttpConnection.cs b/src/Servers/Kestrel/Core/src/Internal/HttpConnection.cs index 92d59a66afd2..2bb90b1ae0ad 100644 --- a/src/Servers/Kestrel/Core/src/Internal/HttpConnection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/HttpConnection.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class HttpConnection : ITimeoutHandler + internal class HttpConnection : ITimeoutHandler { private static readonly ReadOnlyMemory Http2Id = new[] { (byte)'h', (byte)'2' }; diff --git a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionBuilderExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionBuilderExtensions.cs index dcd073855bc7..a2ac0839b0da 100644 --- a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionBuilderExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionBuilderExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public static class HttpConnectionBuilderExtensions + internal static class HttpConnectionBuilderExtensions { public static IConnectionBuilder UseHttpServer(this IConnectionBuilder builder, ServiceContext serviceContext, IHttpApplication application, HttpProtocols protocols) { diff --git a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionContext.cs b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionContext.cs index 581c63bfecf1..3198f6006b20 100644 --- a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionContext.cs +++ b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Buffers; @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class HttpConnectionContext + internal class HttpConnectionContext { public string ConnectionId { get; set; } public HttpProtocols Protocols { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionMiddleware.cs b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionMiddleware.cs index 2841259c4fe4..76b2f3c8e0ce 100644 --- a/src/Servers/Kestrel/Core/src/Internal/HttpConnectionMiddleware.cs +++ b/src/Servers/Kestrel/Core/src/Internal/HttpConnectionMiddleware.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Collections.Generic; @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class HttpConnectionMiddleware + internal class HttpConnectionMiddleware { private readonly IList _connectionAdapters; private readonly ServiceContext _serviceContext; diff --git a/src/Servers/Kestrel/Core/src/Internal/HttpsConnectionAdapter.cs b/src/Servers/Kestrel/Core/src/Internal/HttpsConnectionAdapter.cs index 5b365c9bc332..7b43cb37ea5a 100644 --- a/src/Servers/Kestrel/Core/src/Internal/HttpsConnectionAdapter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/HttpsConnectionAdapter.cs @@ -11,15 +11,15 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections.Features; -using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Http.Features; namespace Microsoft.AspNetCore.Server.Kestrel.Https.Internal { - public class HttpsConnectionAdapter : IConnectionAdapter + internal class HttpsConnectionAdapter : IConnectionAdapter { private static readonly ClosedAdaptedConnection _closedAdaptedConnection = new ClosedAdaptedConnection(); @@ -76,7 +76,7 @@ private async Task InnerOnConnectionAsync(ConnectionAdapterC { SslStream sslStream; bool certificateRequired; - var feature = new TlsConnectionFeature(); + var feature = new Core.Internal.TlsConnectionFeature(); context.Features.Set(feature); context.Features.Set(feature); diff --git a/src/Servers/Kestrel/Core/src/Internal/IRequestProcessor.cs b/src/Servers/Kestrel/Core/src/Internal/IRequestProcessor.cs index 9f886de64d6f..fa9c410527de 100644 --- a/src/Servers/Kestrel/Core/src/Internal/IRequestProcessor.cs +++ b/src/Servers/Kestrel/Core/src/Internal/IRequestProcessor.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public interface IRequestProcessor + internal interface IRequestProcessor { Task ProcessRequestsAsync(IHttpApplication application); void StopProcessingNextRequest(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/BodyControl.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/BodyControl.cs index 5fbeead03e39..e167c07ef591 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/BodyControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/BodyControl.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class BodyControl + internal class BodyControl { private static readonly ThrowingWasUpgradedWriteOnlyStream _throwingResponseStream = new ThrowingWasUpgradedWriteOnlyStream(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManager.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManager.cs index bd94ce56580f..cb402facea81 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManager.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManager.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class ConnectionManager + internal class ConnectionManager { private readonly ConcurrentDictionary _connectionReferences = new ConcurrentDictionary(); private readonly IKestrelTrace _trace; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManagerShutdownExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManagerShutdownExtensions.cs index c4a75c97fb95..5877cbcf5572 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManagerShutdownExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManagerShutdownExtensions.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static class ConnectionManagerShutdownExtensions + internal static class ConnectionManagerShutdownExtensions { public static async Task CloseAllConnectionsAsync(this ConnectionManager connectionManager, CancellationToken token) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionReference.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionReference.cs index f577a1353a63..b5dc202e01bd 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionReference.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionReference.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class ConnectionReference + internal class ConnectionReference { private readonly WeakReference _weakReference; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Disposable.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Disposable.cs index 620e749fe60b..979eca6d0688 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Disposable.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Disposable.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure /// /// Summary description for Disposable /// - public class Disposable : IDisposable + internal class Disposable : IDisposable { private Action _dispose; private bool _disposedValue = false; // To detect redundant calls diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Heartbeat.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Heartbeat.cs index fdf5e750105e..7cba84b13884 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Heartbeat.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/Heartbeat.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class Heartbeat : IDisposable + internal class Heartbeat : IDisposable { public static readonly TimeSpan Interval = TimeSpan.FromSeconds(1); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HeartbeatManager.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HeartbeatManager.cs index 97cfee5272f6..8fcd25fe9830 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HeartbeatManager.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HeartbeatManager.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class HeartbeatManager : IHeartbeatHandler, ISystemClock + internal class HeartbeatManager : IHeartbeatHandler, ISystemClock { private readonly ConnectionManager _connectionManager; private readonly Action _walkCallback; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs index 1dd2e252c2b5..89443f3de0f2 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static partial class HttpUtilities + internal static partial class HttpUtilities { // readonly primitive statics can be Jit'd to consts https://github.com/dotnet/coreclr/issues/1079 private static readonly ulong _httpConnectMethodLong = GetAsciiStringAsLong("CONNECT "); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs index 7c5276259efa..176e24d1baa7 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static partial class HttpUtilities + internal static partial class HttpUtilities { public const string Http10Version = "HTTP/1.0"; public const string Http11Version = "HTTP/1.1"; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IDebugger.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IDebugger.cs index cb1448fd4ffd..2ec2c1cc9ad4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IDebugger.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IDebugger.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public interface IDebugger + internal interface IDebugger { bool IsAttached { get; } } diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IHeartbeatHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IHeartbeatHandler.cs index e6a355e829e8..cb2d2e8f7e04 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IHeartbeatHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IHeartbeatHandler.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public interface IHeartbeatHandler + internal interface IHeartbeatHandler { void OnHeartbeat(DateTimeOffset now); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs index 852fea7953d1..07dae29f9685 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public interface IKestrelTrace : ILogger + internal interface IKestrelTrace : ILogger { void ConnectionStart(string connectionId); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ISystemClock.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ISystemClock.cs index 7b64f79d36f2..24eaf6e4a3dc 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ISystemClock.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ISystemClock.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure /// /// Abstracts the system clock to facilitate testing. /// - public interface ISystemClock + internal interface ISystemClock { /// /// Retrieves the current UTC system time. diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutControl.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutControl.cs index 1bd5692a895b..6f303d56b218 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutControl.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public interface ITimeoutControl + internal interface ITimeoutControl { TimeoutReason TimerReason { get; } diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutHandler.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutHandler.cs index 30eb2b8b297c..a8a4a6cfae17 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutHandler.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ITimeoutHandler.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public interface ITimeoutHandler + internal interface ITimeoutHandler { void OnTimeout(TimeoutReason reason); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelConnection.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelConnection.cs index cef9f797a802..a253aa5c328d 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelConnection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelConnection.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class KestrelConnection + internal class KestrelConnection { private TaskCompletionSource _executionTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelEventSource.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelEventSource.cs index a2a545337963..ae6a03915b9c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelEventSource.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelEventSource.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics.Tracing; @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { [EventSource(Name = "Microsoft-AspNetCore-Server-Kestrel")] - public sealed class KestrelEventSource : EventSource + internal sealed class KestrelEventSource : EventSource { public static readonly KestrelEventSource Log = new KestrelEventSource(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs index 39bf9d2895ee..c44b84cc0a6c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs @@ -8,9 +8,9 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal +namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class KestrelTrace : IKestrelTrace + internal class KestrelTrace : IKestrelTrace { private static readonly Action _connectionStart = LoggerMessage.Define(LogLevel.Debug, new EventId(1, nameof(ConnectionStart)), @"Connection id ""{ConnectionId}"" started."); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ReadOnlyStream.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ReadOnlyStream.cs index cf4b02a41f32..f5fc4c2a1a95 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ReadOnlyStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ReadOnlyStream.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public abstract class ReadOnlyStream : Stream + internal abstract class ReadOnlyStream : Stream { public override bool CanRead => true; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ResourceCounter.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ResourceCounter.cs index 68c96e25acbd..eb0ee7238c2c 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ResourceCounter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ResourceCounter.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public abstract class ResourceCounter + internal abstract class ResourceCounter { public abstract bool TryLockOne(); public abstract void ReleaseOne(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThreadPoolAwaitable.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThreadPoolAwaitable.cs index 361cbe3ba404..69f3cb48d588 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThreadPoolAwaitable.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThreadPoolAwaitable.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { - public class ThreadPoolAwaitable : ICriticalNotifyCompletion + internal class ThreadPoolAwaitable : ICriticalNotifyCompletion { public static ThreadPoolAwaitable Instance = new ThreadPoolAwaitable(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThrowingWasUpgradedWriteOnlyStream.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThrowingWasUpgradedWriteOnlyStream.cs index cbb454337377..78ead0c350b5 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThrowingWasUpgradedWriteOnlyStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ThrowingWasUpgradedWriteOnlyStream.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class ThrowingWasUpgradedWriteOnlyStream : WriteOnlyStream + internal class ThrowingWasUpgradedWriteOnlyStream : WriteOnlyStream { public override bool CanSeek => false; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControl.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControl.cs index 61ceb814d99f..1d9cef950acb 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControl.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public class TimeoutControl : ITimeoutControl, IConnectionTimeoutFeature + internal class TimeoutControl : ITimeoutControl, IConnectionTimeoutFeature { private readonly ITimeoutHandler _timeoutHandler; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControlExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControlExtensions.cs index 1a2c809abb44..0b73584cb829 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControlExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControlExtensions.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public static class TimeoutControlExtensions + internal static class TimeoutControlExtensions { public static void StartDrainTimeout(this ITimeoutControl timeoutControl, MinDataRate minDataRate, long? maxResponseBufferSize) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutReason.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutReason.cs index c7b1a5da5cf9..3cee0589c7c4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutReason.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutReason.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public enum TimeoutReason + internal enum TimeoutReason { None, KeepAlive, diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimingPipeFlusher.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimingPipeFlusher.cs index 190aaf5ac237..e9c66b40b651 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimingPipeFlusher.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimingPipeFlusher.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure /// This wraps PipeWriter.FlushAsync() in a way that allows multiple awaiters making it safe to call from publicly /// exposed Stream implementations while also tracking response data rate. /// - public class TimingPipeFlusher + internal class TimingPipeFlusher { private readonly PipeWriter _writer; private readonly ITimeoutControl _timeoutControl; diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/WriteOnlyStream.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/WriteOnlyStream.cs index c7042e2bb042..b4e4d471bb14 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/WriteOnlyStream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/WriteOnlyStream.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure { - public abstract class WriteOnlyStream : Stream + internal abstract class WriteOnlyStream : Stream { public override bool CanRead => false; diff --git a/src/Servers/Kestrel/Core/src/Internal/KestrelServerOptionsSetup.cs b/src/Servers/Kestrel/Core/src/Internal/KestrelServerOptionsSetup.cs index 18c96e20390c..0c7d0a375f7f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/KestrelServerOptionsSetup.cs +++ b/src/Servers/Kestrel/Core/src/Internal/KestrelServerOptionsSetup.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class KestrelServerOptionsSetup : IConfigureOptions + internal class KestrelServerOptionsSetup : IConfigureOptions { private IServiceProvider _services; diff --git a/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs b/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs index 0a4c6f3a5e7e..20afa773040f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs +++ b/src/Servers/Kestrel/Core/src/Internal/LoggerExtensions.cs @@ -1,8 +1,11 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System; using System.Security.Cryptography.X509Certificates; using Microsoft.Extensions.Logging; -namespace Microsoft.AspNetCore.Server.Kestrel.Internal +namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { internal static class LoggerExtensions { diff --git a/src/Servers/Kestrel/Core/src/Internal/ServiceContext.cs b/src/Servers/Kestrel/Core/src/Internal/ServiceContext.cs index 270640db2a8b..dae02a6eb070 100644 --- a/src/Servers/Kestrel/Core/src/Internal/ServiceContext.cs +++ b/src/Servers/Kestrel/Core/src/Internal/ServiceContext.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { - public class ServiceContext + internal class ServiceContext { public IKestrelTrace Log { get; set; } diff --git a/src/Servers/Kestrel/Core/src/Internal/TlsConnectionFeature.cs b/src/Servers/Kestrel/Core/src/Internal/TlsConnectionFeature.cs index 97cd9b426fc3..3db33011d7f2 100644 --- a/src/Servers/Kestrel/Core/src/Internal/TlsConnectionFeature.cs +++ b/src/Servers/Kestrel/Core/src/Internal/TlsConnectionFeature.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; -namespace Microsoft.AspNetCore.Server.Kestrel.Https.Internal +namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal { internal class TlsConnectionFeature : ITlsConnectionFeature, ITlsApplicationProtocolFeature, ITlsHandshakeFeature { diff --git a/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs b/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs index 49949911b955..eb7622648f1c 100644 --- a/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs +++ b/src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs @@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.Https.Internal; -using Microsoft.AspNetCore.Server.Kestrel.Internal; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs index aa36ee7ff1ff..3b29d1ee1a16 100644 --- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs @@ -8,8 +8,8 @@ using System.Security.Cryptography.X509Certificates; using Microsoft.AspNetCore.Certificates.Generation; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Https; -using Microsoft.AspNetCore.Server.Kestrel.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Servers/Kestrel/Core/src/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/Core/src/Properties/AssemblyInfo.cs index a5be929fb4c0..68bba26c6e03 100644 --- a/src/Servers/Kestrel/Core/src/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/Core/src/Properties/AssemblyInfo.cs @@ -9,7 +9,9 @@ [assembly: InternalsVisibleTo("InMemory.FunctionalTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Sockets.BindTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Libuv.BindTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Core.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("PlatformBenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Servers/Kestrel/Core/src/baseline.netcore.json b/src/Servers/Kestrel/Core/src/baseline.netcore.json index 5f839cd3bdeb..096c34342863 100644 --- a/src/Servers/Kestrel/Core/src/baseline.netcore.json +++ b/src/Servers/Kestrel/Core/src/baseline.netcore.json @@ -872,11 +872,11 @@ "Parameters": [ { "Name": "reason", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Core.Http.RequestRejectionReason" }, { "Name": "method", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Core.Http.HttpMethod" } ], "ReturnType": "System.Void", @@ -1015,7 +1015,7 @@ }, { "Name": "transportFactory", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransportFactory" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.ITransportFactory" }, { "Name": "loggerFactory", @@ -1327,7 +1327,7 @@ "Kind": "Method", "Name": "get_ApplicationSchedulingMode", "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.SchedulingMode", + "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.SchedulingMode", "Visibility": "Public", "GenericParameter": [] }, @@ -1337,7 +1337,7 @@ "Parameters": [ { "Name": "value", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.SchedulingMode" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.SchedulingMode" } ], "ReturnType": "System.Void", @@ -1665,7 +1665,7 @@ "Visibility": "Public", "Kind": "Class", "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Microsoft.AspNetCore.Connections.IConnectionBuilder" ], "Members": [ @@ -1673,10 +1673,10 @@ "Kind": "Method", "Name": "get_Type", "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ListenType", + "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.ListenType", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1684,10 +1684,10 @@ "Kind": "Method", "Name": "get_HandleType", "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.FileHandleType", + "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.FileHandleType", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1697,13 +1697,13 @@ "Parameters": [ { "Name": "value", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.FileHandleType" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.FileHandleType" } ], "ReturnType": "System.Void", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1714,7 +1714,7 @@ "ReturnType": "System.Net.IPEndPoint", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1730,7 +1730,7 @@ "ReturnType": "System.Void", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1741,7 +1741,7 @@ "ReturnType": "System.String", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1752,7 +1752,7 @@ "ReturnType": "System.UInt64", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1771,7 +1771,7 @@ "ReturnType": "System.Boolean", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation", "Visibility": "Public", "GenericParameter": [] }, @@ -1792,7 +1792,7 @@ "Kind": "Method", "Name": "get_ConnectionAdapters", "Parameters": [], - "ReturnType": "System.Collections.Generic.List", + "ReturnType": "System.Collections.Generic.List", "Visibility": "Public", "GenericParameter": [] }, diff --git a/src/Servers/Kestrel/Core/test/Http1ConnectionTests.cs b/src/Servers/Kestrel/Core/test/Http1ConnectionTests.cs index 533c24c9ca4a..ce1f86e7a6d5 100644 --- a/src/Servers/Kestrel/Core/test/Http1ConnectionTests.cs +++ b/src/Servers/Kestrel/Core/test/Http1ConnectionTests.cs @@ -525,8 +525,9 @@ public async Task TakeStartLineThrowsWhenRequestTargetIsInvalid(string method, s [Theory] [MemberData(nameof(MethodNotAllowedTargetData))] - public async Task TakeStartLineThrowsWhenMethodNotAllowed(string requestLine, HttpMethod allowedMethod) + public async Task TakeStartLineThrowsWhenMethodNotAllowed(string requestLine, int intAllowedMethod) { + var allowedMethod = (HttpMethod)intAllowedMethod; await _application.Output.WriteAsync(Encoding.ASCII.GetBytes(requestLine)); var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; @@ -978,7 +979,7 @@ public static TheoryData TargetWithEncodedNullCharData public static TheoryData TargetInvalidData => HttpParsingData.TargetInvalidData; - public static TheoryData MethodNotAllowedTargetData + public static TheoryData MethodNotAllowedTargetData => HttpParsingData.MethodNotAllowedRequestLine; public static TheoryData TargetWithNullCharData diff --git a/src/Servers/Kestrel/Core/test/HttpConnectionManagerTests.cs b/src/Servers/Kestrel/Core/test/HttpConnectionManagerTests.cs index 9e821b6920ce..809c719e5bb3 100644 --- a/src/Servers/Kestrel/Core/test/HttpConnectionManagerTests.cs +++ b/src/Servers/Kestrel/Core/test/HttpConnectionManagerTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; diff --git a/src/Servers/Kestrel/Core/test/HttpHeadersTests.cs b/src/Servers/Kestrel/Core/test/HttpHeadersTests.cs index 26104361bd55..3acb2f567b46 100644 --- a/src/Servers/Kestrel/Core/test/HttpHeadersTests.cs +++ b/src/Servers/Kestrel/Core/test/HttpHeadersTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -13,202 +13,208 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests public class HttpHeadersTests { [Theory] - [InlineData("", ConnectionOptions.None)] - [InlineData(",", ConnectionOptions.None)] - [InlineData(" ,", ConnectionOptions.None)] - [InlineData(" , ", ConnectionOptions.None)] - [InlineData(",,", ConnectionOptions.None)] - [InlineData(" ,,", ConnectionOptions.None)] - [InlineData(",, ", ConnectionOptions.None)] - [InlineData(" , ,", ConnectionOptions.None)] - [InlineData(" , , ", ConnectionOptions.None)] - [InlineData("keep-alive", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive, upgrade", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("keep-alive,upgrade", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("upgrade, keep-alive", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("upgrade,keep-alive", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("upgrade,,keep-alive", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("keep-alive,", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive,,", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive, ", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive, ,", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive, , ", ConnectionOptions.KeepAlive)] - [InlineData("keep-alive ,", ConnectionOptions.KeepAlive)] - [InlineData(",keep-alive", ConnectionOptions.KeepAlive)] - [InlineData(", keep-alive", ConnectionOptions.KeepAlive)] - [InlineData(",,keep-alive", ConnectionOptions.KeepAlive)] - [InlineData(", ,keep-alive", ConnectionOptions.KeepAlive)] - [InlineData(",, keep-alive", ConnectionOptions.KeepAlive)] - [InlineData(", , keep-alive", ConnectionOptions.KeepAlive)] - [InlineData("upgrade,", ConnectionOptions.Upgrade)] - [InlineData("upgrade,,", ConnectionOptions.Upgrade)] - [InlineData("upgrade, ", ConnectionOptions.Upgrade)] - [InlineData("upgrade, ,", ConnectionOptions.Upgrade)] - [InlineData("upgrade, , ", ConnectionOptions.Upgrade)] - [InlineData("upgrade ,", ConnectionOptions.Upgrade)] - [InlineData(",upgrade", ConnectionOptions.Upgrade)] - [InlineData(", upgrade", ConnectionOptions.Upgrade)] - [InlineData(",,upgrade", ConnectionOptions.Upgrade)] - [InlineData(", ,upgrade", ConnectionOptions.Upgrade)] - [InlineData(",, upgrade", ConnectionOptions.Upgrade)] - [InlineData(", , upgrade", ConnectionOptions.Upgrade)] - [InlineData("close,", ConnectionOptions.Close)] - [InlineData("close,,", ConnectionOptions.Close)] - [InlineData("close, ", ConnectionOptions.Close)] - [InlineData("close, ,", ConnectionOptions.Close)] - [InlineData("close, , ", ConnectionOptions.Close)] - [InlineData("close ,", ConnectionOptions.Close)] - [InlineData(",close", ConnectionOptions.Close)] - [InlineData(", close", ConnectionOptions.Close)] - [InlineData(",,close", ConnectionOptions.Close)] - [InlineData(", ,close", ConnectionOptions.Close)] - [InlineData(",, close", ConnectionOptions.Close)] - [InlineData(", , close", ConnectionOptions.Close)] - [InlineData("kupgrade", ConnectionOptions.None)] - [InlineData("keupgrade", ConnectionOptions.None)] - [InlineData("ukeep-alive", ConnectionOptions.None)] - [InlineData("upkeep-alive", ConnectionOptions.None)] - [InlineData("k,upgrade", ConnectionOptions.Upgrade)] - [InlineData("u,keep-alive", ConnectionOptions.KeepAlive)] - [InlineData("ke,upgrade", ConnectionOptions.Upgrade)] - [InlineData("up,keep-alive", ConnectionOptions.KeepAlive)] - [InlineData("close", ConnectionOptions.Close)] - [InlineData("upgrade,close", ConnectionOptions.Close | ConnectionOptions.Upgrade)] - [InlineData("close,upgrade", ConnectionOptions.Close | ConnectionOptions.Upgrade)] - [InlineData("keep-alive2", ConnectionOptions.None)] - [InlineData("keep-alive2 ", ConnectionOptions.None)] - [InlineData("keep-alive2 ,", ConnectionOptions.None)] - [InlineData("keep-alive2,", ConnectionOptions.None)] - [InlineData("upgrade2", ConnectionOptions.None)] - [InlineData("upgrade2 ", ConnectionOptions.None)] - [InlineData("upgrade2 ,", ConnectionOptions.None)] - [InlineData("upgrade2,", ConnectionOptions.None)] - [InlineData("close2", ConnectionOptions.None)] - [InlineData("close2 ", ConnectionOptions.None)] - [InlineData("close2 ,", ConnectionOptions.None)] - [InlineData("close2,", ConnectionOptions.None)] - [InlineData("keep-alivekeep-alive", ConnectionOptions.None)] - [InlineData("keep-aliveupgrade", ConnectionOptions.None)] - [InlineData("upgradeupgrade", ConnectionOptions.None)] - [InlineData("upgradekeep-alive", ConnectionOptions.None)] - [InlineData("closeclose", ConnectionOptions.None)] - [InlineData("closeupgrade", ConnectionOptions.None)] - [InlineData("upgradeclose", ConnectionOptions.None)] - [InlineData("keep-alive 2", ConnectionOptions.None)] - [InlineData("upgrade 2", ConnectionOptions.None)] - [InlineData("keep-alive 2, close", ConnectionOptions.Close)] - [InlineData("upgrade 2, close", ConnectionOptions.Close)] - [InlineData("close, keep-alive 2", ConnectionOptions.Close)] - [InlineData("close, upgrade 2", ConnectionOptions.Close)] - [InlineData("close 2, upgrade", ConnectionOptions.Upgrade)] - [InlineData("upgrade, close 2", ConnectionOptions.Upgrade)] - [InlineData("k2ep-alive", ConnectionOptions.None)] - [InlineData("ke2p-alive", ConnectionOptions.None)] - [InlineData("u2grade", ConnectionOptions.None)] - [InlineData("up2rade", ConnectionOptions.None)] - [InlineData("c2ose", ConnectionOptions.None)] - [InlineData("cl2se", ConnectionOptions.None)] - [InlineData("k2ep-alive,", ConnectionOptions.None)] - [InlineData("ke2p-alive,", ConnectionOptions.None)] - [InlineData("u2grade,", ConnectionOptions.None)] - [InlineData("up2rade,", ConnectionOptions.None)] - [InlineData("c2ose,", ConnectionOptions.None)] - [InlineData("cl2se,", ConnectionOptions.None)] - [InlineData("k2ep-alive ", ConnectionOptions.None)] - [InlineData("ke2p-alive ", ConnectionOptions.None)] - [InlineData("u2grade ", ConnectionOptions.None)] - [InlineData("up2rade ", ConnectionOptions.None)] - [InlineData("c2ose ", ConnectionOptions.None)] - [InlineData("cl2se ", ConnectionOptions.None)] - [InlineData("k2ep-alive ,", ConnectionOptions.None)] - [InlineData("ke2p-alive ,", ConnectionOptions.None)] - [InlineData("u2grade ,", ConnectionOptions.None)] - [InlineData("up2rade ,", ConnectionOptions.None)] - [InlineData("c2ose ,", ConnectionOptions.None)] - [InlineData("cl2se ,", ConnectionOptions.None)] - public void TestParseConnection(string connection, ConnectionOptions expectedConnectionOptions) + [InlineData("", (int)(ConnectionOptions.None))] + [InlineData(",", (int)(ConnectionOptions.None))] + [InlineData(" ,", (int)(ConnectionOptions.None))] + [InlineData(" , ", (int)(ConnectionOptions.None))] + [InlineData(",,", (int)(ConnectionOptions.None))] + [InlineData(" ,,", (int)(ConnectionOptions.None))] + [InlineData(",, ", (int)(ConnectionOptions.None))] + [InlineData(" , ,", (int)(ConnectionOptions.None))] + [InlineData(" , , ", (int)(ConnectionOptions.None))] + [InlineData("keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive, upgrade", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("keep-alive,upgrade", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("upgrade, keep-alive", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("upgrade,keep-alive", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("upgrade,,keep-alive", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("keep-alive,", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive,,", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive, ", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive, ,", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive, , ", (int)(ConnectionOptions.KeepAlive))] + [InlineData("keep-alive ,", (int)(ConnectionOptions.KeepAlive))] + [InlineData(",keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData(", keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData(",,keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData(", ,keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData(",, keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData(", , keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData("upgrade,", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade,,", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade, ", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade, ,", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade, , ", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade ,", (int)(ConnectionOptions.Upgrade))] + [InlineData(",upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData(", upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData(",,upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData(", ,upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData(",, upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData(", , upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData("close,", (int)(ConnectionOptions.Close))] + [InlineData("close,,", (int)(ConnectionOptions.Close))] + [InlineData("close, ", (int)(ConnectionOptions.Close))] + [InlineData("close, ,", (int)(ConnectionOptions.Close))] + [InlineData("close, , ", (int)(ConnectionOptions.Close))] + [InlineData("close ,", (int)(ConnectionOptions.Close))] + [InlineData(",close", (int)(ConnectionOptions.Close))] + [InlineData(", close", (int)(ConnectionOptions.Close))] + [InlineData(",,close", (int)(ConnectionOptions.Close))] + [InlineData(", ,close", (int)(ConnectionOptions.Close))] + [InlineData(",, close", (int)(ConnectionOptions.Close))] + [InlineData(", , close", (int)(ConnectionOptions.Close))] + [InlineData("kupgrade", (int)(ConnectionOptions.None))] + [InlineData("keupgrade", (int)(ConnectionOptions.None))] + [InlineData("ukeep-alive", (int)(ConnectionOptions.None))] + [InlineData("upkeep-alive", (int)(ConnectionOptions.None))] + [InlineData("k,upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData("u,keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData("ke,upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData("up,keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData("close", (int)(ConnectionOptions.Close))] + [InlineData("upgrade,close", (int)(ConnectionOptions.Close | ConnectionOptions.Upgrade))] + [InlineData("close,upgrade", (int)(ConnectionOptions.Close | ConnectionOptions.Upgrade))] + [InlineData("keep-alive2", (int)(ConnectionOptions.None))] + [InlineData("keep-alive2 ", (int)(ConnectionOptions.None))] + [InlineData("keep-alive2 ,", (int)(ConnectionOptions.None))] + [InlineData("keep-alive2,", (int)(ConnectionOptions.None))] + [InlineData("upgrade2", (int)(ConnectionOptions.None))] + [InlineData("upgrade2 ", (int)(ConnectionOptions.None))] + [InlineData("upgrade2 ,", (int)(ConnectionOptions.None))] + [InlineData("upgrade2,", (int)(ConnectionOptions.None))] + [InlineData("close2", (int)(ConnectionOptions.None))] + [InlineData("close2 ", (int)(ConnectionOptions.None))] + [InlineData("close2 ,", (int)(ConnectionOptions.None))] + [InlineData("close2,", (int)(ConnectionOptions.None))] + [InlineData("keep-alivekeep-alive", (int)(ConnectionOptions.None))] + [InlineData("keep-aliveupgrade", (int)(ConnectionOptions.None))] + [InlineData("upgradeupgrade", (int)(ConnectionOptions.None))] + [InlineData("upgradekeep-alive", (int)(ConnectionOptions.None))] + [InlineData("closeclose", (int)(ConnectionOptions.None))] + [InlineData("closeupgrade", (int)(ConnectionOptions.None))] + [InlineData("upgradeclose", (int)(ConnectionOptions.None))] + [InlineData("keep-alive 2", (int)(ConnectionOptions.None))] + [InlineData("upgrade 2", (int)(ConnectionOptions.None))] + [InlineData("keep-alive 2, close", (int)(ConnectionOptions.Close))] + [InlineData("upgrade 2, close", (int)(ConnectionOptions.Close))] + [InlineData("close, keep-alive 2", (int)(ConnectionOptions.Close))] + [InlineData("close, upgrade 2", (int)(ConnectionOptions.Close))] + [InlineData("close 2, upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData("upgrade, close 2", (int)(ConnectionOptions.Upgrade))] + [InlineData("k2ep-alive", (int)(ConnectionOptions.None))] + [InlineData("ke2p-alive", (int)(ConnectionOptions.None))] + [InlineData("u2grade", (int)(ConnectionOptions.None))] + [InlineData("up2rade", (int)(ConnectionOptions.None))] + [InlineData("c2ose", (int)(ConnectionOptions.None))] + [InlineData("cl2se", (int)(ConnectionOptions.None))] + [InlineData("k2ep-alive,", (int)(ConnectionOptions.None))] + [InlineData("ke2p-alive,", (int)(ConnectionOptions.None))] + [InlineData("u2grade,", (int)(ConnectionOptions.None))] + [InlineData("up2rade,", (int)(ConnectionOptions.None))] + [InlineData("c2ose,", (int)(ConnectionOptions.None))] + [InlineData("cl2se,", (int)(ConnectionOptions.None))] + [InlineData("k2ep-alive ", (int)(ConnectionOptions.None))] + [InlineData("ke2p-alive ", (int)(ConnectionOptions.None))] + [InlineData("u2grade ", (int)(ConnectionOptions.None))] + [InlineData("up2rade ", (int)(ConnectionOptions.None))] + [InlineData("c2ose ", (int)(ConnectionOptions.None))] + [InlineData("cl2se ", (int)(ConnectionOptions.None))] + [InlineData("k2ep-alive ,", (int)(ConnectionOptions.None))] + [InlineData("ke2p-alive ,", (int)(ConnectionOptions.None))] + [InlineData("u2grade ,", (int)(ConnectionOptions.None))] + [InlineData("up2rade ,", (int)(ConnectionOptions.None))] + [InlineData("c2ose ,", (int)(ConnectionOptions.None))] + [InlineData("cl2se ,", (int)(ConnectionOptions.None))] + public void TestParseConnection(string connection, int intExpectedConnectionOptions) { + var expectedConnectionOptions = (ConnectionOptions)intExpectedConnectionOptions; var connectionOptions = HttpHeaders.ParseConnection(connection); Assert.Equal(expectedConnectionOptions, connectionOptions); } [Theory] - [InlineData("keep-alive", "upgrade", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("upgrade", "keep-alive", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("keep-alive", "", ConnectionOptions.KeepAlive)] - [InlineData("", "keep-alive", ConnectionOptions.KeepAlive)] - [InlineData("upgrade", "", ConnectionOptions.Upgrade)] - [InlineData("", "upgrade", ConnectionOptions.Upgrade)] - [InlineData("keep-alive, upgrade", "", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("upgrade, keep-alive", "", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("", "keep-alive, upgrade", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("", "upgrade, keep-alive", ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade)] - [InlineData("", "", ConnectionOptions.None)] - [InlineData("close", "", ConnectionOptions.Close)] - [InlineData("", "close", ConnectionOptions.Close)] - [InlineData("close", "upgrade", ConnectionOptions.Close | ConnectionOptions.Upgrade)] - [InlineData("upgrade", "close", ConnectionOptions.Close | ConnectionOptions.Upgrade)] - public void TestParseConnectionMultipleValues(string value1, string value2, ConnectionOptions expectedConnectionOptions) + [InlineData("keep-alive", "upgrade", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("upgrade", "keep-alive", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("keep-alive", "", (int)(ConnectionOptions.KeepAlive))] + [InlineData("", "keep-alive", (int)(ConnectionOptions.KeepAlive))] + [InlineData("upgrade", "", (int)(ConnectionOptions.Upgrade))] + [InlineData("", "upgrade", (int)(ConnectionOptions.Upgrade))] + [InlineData("keep-alive, upgrade", "", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("upgrade, keep-alive", "", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("", "keep-alive, upgrade", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("", "upgrade, keep-alive", (int)(ConnectionOptions.KeepAlive | ConnectionOptions.Upgrade))] + [InlineData("", "", (int)(ConnectionOptions.None))] + [InlineData("close", "", (int)(ConnectionOptions.Close))] + [InlineData("", "close", (int)(ConnectionOptions.Close))] + [InlineData("close", "upgrade", (int)(ConnectionOptions.Close | ConnectionOptions.Upgrade))] + [InlineData("upgrade", "close", (int)(ConnectionOptions.Close | ConnectionOptions.Upgrade))] + public void TestParseConnectionMultipleValues(string value1, string value2, int intExpectedConnectionOptions) { + var expectedConnectionOptions = (ConnectionOptions)intExpectedConnectionOptions; var connection = new StringValues(new[] { value1, value2 }); var connectionOptions = HttpHeaders.ParseConnection(connection); Assert.Equal(expectedConnectionOptions, connectionOptions); } [Theory] - [InlineData("", TransferCoding.None)] - [InlineData(",,", TransferCoding.None)] - [InlineData(" ,,", TransferCoding.None)] - [InlineData(",, ", TransferCoding.None)] - [InlineData(" , ,", TransferCoding.None)] - [InlineData(" , , ", TransferCoding.None)] - [InlineData("chunked,", TransferCoding.Chunked)] - [InlineData("chunked,,", TransferCoding.Chunked)] - [InlineData("chunked, ", TransferCoding.Chunked)] - [InlineData("chunked, ,", TransferCoding.Chunked)] - [InlineData("chunked, , ", TransferCoding.Chunked)] - [InlineData("chunked ,", TransferCoding.Chunked)] - [InlineData(",chunked", TransferCoding.Chunked)] - [InlineData(", chunked", TransferCoding.Chunked)] - [InlineData(",,chunked", TransferCoding.Chunked)] - [InlineData(", ,chunked", TransferCoding.Chunked)] - [InlineData(",, chunked", TransferCoding.Chunked)] - [InlineData(", , chunked", TransferCoding.Chunked)] - [InlineData("chunked, gzip", TransferCoding.Other)] - [InlineData("chunked,compress", TransferCoding.Other)] - [InlineData("deflate, chunked", TransferCoding.Chunked)] - [InlineData("gzip,chunked", TransferCoding.Chunked)] - [InlineData("compress,,chunked", TransferCoding.Chunked)] - [InlineData("chunkedchunked", TransferCoding.Other)] - [InlineData("chunked2", TransferCoding.Other)] - [InlineData("chunked 2", TransferCoding.Other)] - [InlineData("2chunked", TransferCoding.Other)] - [InlineData("c2unked", TransferCoding.Other)] - [InlineData("ch2nked", TransferCoding.Other)] - [InlineData("chunked 2, gzip", TransferCoding.Other)] - [InlineData("chunked2, gzip", TransferCoding.Other)] - [InlineData("gzip, chunked 2", TransferCoding.Other)] - [InlineData("gzip, chunked2", TransferCoding.Other)] - public void TestParseTransferEncoding(string transferEncoding, TransferCoding expectedTransferEncodingOptions) + [InlineData("", (int)(TransferCoding.None))] + [InlineData(",,", (int)(TransferCoding.None))] + [InlineData(" ,,", (int)(TransferCoding.None))] + [InlineData(",, ", (int)(TransferCoding.None))] + [InlineData(" , ,", (int)(TransferCoding.None))] + [InlineData(" , , ", (int)(TransferCoding.None))] + [InlineData("chunked,", (int)(TransferCoding.Chunked))] + [InlineData("chunked,,", (int)(TransferCoding.Chunked))] + [InlineData("chunked, ", (int)(TransferCoding.Chunked))] + [InlineData("chunked, ,", (int)(TransferCoding.Chunked))] + [InlineData("chunked, , ", (int)(TransferCoding.Chunked))] + [InlineData("chunked ,", (int)(TransferCoding.Chunked))] + [InlineData(",chunked", (int)(TransferCoding.Chunked))] + [InlineData(", chunked", (int)(TransferCoding.Chunked))] + [InlineData(",,chunked", (int)(TransferCoding.Chunked))] + [InlineData(", ,chunked", (int)(TransferCoding.Chunked))] + [InlineData(",, chunked", (int)(TransferCoding.Chunked))] + [InlineData(", , chunked", (int)(TransferCoding.Chunked))] + [InlineData("chunked, gzip", (int)(TransferCoding.Other))] + [InlineData("chunked,compress", (int)(TransferCoding.Other))] + [InlineData("deflate, chunked", (int)(TransferCoding.Chunked))] + [InlineData("gzip,chunked", (int)(TransferCoding.Chunked))] + [InlineData("compress,,chunked", (int)(TransferCoding.Chunked))] + [InlineData("chunkedchunked", (int)(TransferCoding.Other))] + [InlineData("chunked2", (int)(TransferCoding.Other))] + [InlineData("chunked 2", (int)(TransferCoding.Other))] + [InlineData("2chunked", (int)(TransferCoding.Other))] + [InlineData("c2unked", (int)(TransferCoding.Other))] + [InlineData("ch2nked", (int)(TransferCoding.Other))] + [InlineData("chunked 2, gzip", (int)(TransferCoding.Other))] + [InlineData("chunked2, gzip", (int)(TransferCoding.Other))] + [InlineData("gzip, chunked 2", (int)(TransferCoding.Other))] + [InlineData("gzip, chunked2", (int)(TransferCoding.Other))] + public void TestParseTransferEncoding(string transferEncoding, int intExpectedTransferEncodingOptions) { + var expectedTransferEncodingOptions = (TransferCoding)intExpectedTransferEncodingOptions; + var transferEncodingOptions = HttpHeaders.GetFinalTransferCoding(transferEncoding); Assert.Equal(expectedTransferEncodingOptions, transferEncodingOptions); } [Theory] - [InlineData("chunked", "gzip", TransferCoding.Other)] - [InlineData("compress", "chunked", TransferCoding.Chunked)] - [InlineData("chunked", "", TransferCoding.Chunked)] - [InlineData("", "chunked", TransferCoding.Chunked)] - [InlineData("chunked, deflate", "", TransferCoding.Other)] - [InlineData("gzip, chunked", "", TransferCoding.Chunked)] - [InlineData("", "chunked, compress", TransferCoding.Other)] - [InlineData("", "compress, chunked", TransferCoding.Chunked)] - [InlineData("", "", TransferCoding.None)] - [InlineData("deflate", "", TransferCoding.Other)] - [InlineData("", "gzip", TransferCoding.Other)] - public void TestParseTransferEncodingMultipleValues(string value1, string value2, TransferCoding expectedTransferEncodingOptions) + [InlineData("chunked", "gzip", (int)(TransferCoding.Other))] + [InlineData("compress", "chunked", (int)(TransferCoding.Chunked))] + [InlineData("chunked", "", (int)(TransferCoding.Chunked))] + [InlineData("", "chunked", (int)(TransferCoding.Chunked))] + [InlineData("chunked, deflate", "", (int)(TransferCoding.Other))] + [InlineData("gzip, chunked", "", (int)(TransferCoding.Chunked))] + [InlineData("", "chunked, compress", (int)(TransferCoding.Other))] + [InlineData("", "compress, chunked", (int)(TransferCoding.Chunked))] + [InlineData("", "", (int)(TransferCoding.None))] + [InlineData("deflate", "", (int)(TransferCoding.Other))] + [InlineData("", "gzip", (int)(TransferCoding.Other))] + public void TestParseTransferEncodingMultipleValues(string value1, string value2, int intExpectedTransferEncodingOptions) { + var expectedTransferEncodingOptions = (TransferCoding)intExpectedTransferEncodingOptions; + var transferEncoding = new StringValues(new[] { value1, value2 }); var transferEncodingOptions = HttpHeaders.GetFinalTransferCoding(transferEncoding); Assert.Equal(expectedTransferEncodingOptions, transferEncodingOptions); diff --git a/src/Servers/Kestrel/Core/test/HttpUtilitiesTest.cs b/src/Servers/Kestrel/Core/test/HttpUtilitiesTest.cs index e21c079b9174..9b58a1e878a2 100644 --- a/src/Servers/Kestrel/Core/test/HttpUtilitiesTest.cs +++ b/src/Servers/Kestrel/Core/test/HttpUtilitiesTest.cs @@ -12,24 +12,25 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests public class HttpUtilitiesTest { [Theory] - [InlineData("CONNECT / HTTP/1.1", true, "CONNECT", HttpMethod.Connect)] - [InlineData("DELETE / HTTP/1.1", true, "DELETE", HttpMethod.Delete)] - [InlineData("GET / HTTP/1.1", true, "GET", HttpMethod.Get)] - [InlineData("HEAD / HTTP/1.1", true, "HEAD", HttpMethod.Head)] - [InlineData("PATCH / HTTP/1.1", true, "PATCH", HttpMethod.Patch)] - [InlineData("POST / HTTP/1.1", true, "POST", HttpMethod.Post)] - [InlineData("PUT / HTTP/1.1", true, "PUT", HttpMethod.Put)] - [InlineData("OPTIONS / HTTP/1.1", true, "OPTIONS", HttpMethod.Options)] - [InlineData("TRACE / HTTP/1.1", true, "TRACE", HttpMethod.Trace)] - [InlineData("GET/ HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("get / HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("GOT / HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("ABC / HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("PO / HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("PO ST / HTTP/1.1", false, null, HttpMethod.Custom)] - [InlineData("short ", false, null, HttpMethod.Custom)] - public void GetsKnownMethod(string input, bool expectedResult, string expectedKnownString, HttpMethod expectedMethod) + [InlineData("CONNECT / HTTP/1.1", true, "CONNECT", (int)HttpMethod.Connect)] + [InlineData("DELETE / HTTP/1.1", true, "DELETE", (int)HttpMethod.Delete)] + [InlineData("GET / HTTP/1.1", true, "GET", (int)HttpMethod.Get)] + [InlineData("HEAD / HTTP/1.1", true, "HEAD", (int)HttpMethod.Head)] + [InlineData("PATCH / HTTP/1.1", true, "PATCH", (int)HttpMethod.Patch)] + [InlineData("POST / HTTP/1.1", true, "POST", (int)HttpMethod.Post)] + [InlineData("PUT / HTTP/1.1", true, "PUT", (int)HttpMethod.Put)] + [InlineData("OPTIONS / HTTP/1.1", true, "OPTIONS", (int)HttpMethod.Options)] + [InlineData("TRACE / HTTP/1.1", true, "TRACE", (int)HttpMethod.Trace)] + [InlineData("GET/ HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("get / HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("GOT / HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("ABC / HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("PO / HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("PO ST / HTTP/1.1", false, null, (int)HttpMethod.Custom)] + [InlineData("short ", false, null, (int)HttpMethod.Custom)] + public void GetsKnownMethod(string input, bool expectedResult, string expectedKnownString, int intExpectedMethod) { + var expectedMethod = (HttpMethod)intExpectedMethod; // Arrange var block = new Span(Encoding.ASCII.GetBytes(input)); @@ -51,14 +52,15 @@ public void GetsKnownMethod(string input, bool expectedResult, string expectedKn } [Theory] - [InlineData("HTTP/1.0\r", true, HttpUtilities.Http10Version, HttpVersion.Http10)] - [InlineData("HTTP/1.1\r", true, HttpUtilities.Http11Version, HttpVersion.Http11)] - [InlineData("HTTP/3.0\r", false, null, HttpVersion.Unknown)] - [InlineData("http/1.0\r", false, null, HttpVersion.Unknown)] - [InlineData("http/1.1\r", false, null, HttpVersion.Unknown)] - [InlineData("short ", false, null, HttpVersion.Unknown)] - public void GetsKnownVersion(string input, bool expectedResult, string expectedKnownString, HttpVersion version) + [InlineData("HTTP/1.0\r", true, HttpUtilities.Http10Version, (int)HttpVersion.Http10)] + [InlineData("HTTP/1.1\r", true, HttpUtilities.Http11Version, (int)HttpVersion.Http11)] + [InlineData("HTTP/3.0\r", false, null, (int)HttpVersion.Unknown)] + [InlineData("http/1.0\r", false, null, (int)HttpVersion.Unknown)] + [InlineData("http/1.1\r", false, null, (int)HttpVersion.Unknown)] + [InlineData("short ", false, null, (int)HttpVersion.Unknown)] + public void GetsKnownVersion(string input, bool expectedResult, string expectedKnownString, int intVersion) { + var version = (HttpVersion)intVersion; // Arrange var block = new Span(Encoding.ASCII.GetBytes(input)); @@ -226,4 +228,4 @@ public void InvalidHostHeadersRejected(string host) Assert.False(HttpUtilities.IsHostHeaderValid(host)); } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Core/test/KnownStringsTests.cs b/src/Servers/Kestrel/Core/test/KnownStringsTests.cs index c55520eab9c0..22388b4393c5 100644 --- a/src/Servers/Kestrel/Core/test/KnownStringsTests.cs +++ b/src/Servers/Kestrel/Core/test/KnownStringsTests.cs @@ -38,42 +38,43 @@ public class KnownStringsTests static byte[] _invalidMethod12 = Encoding.ASCII.GetBytes("TRACE_\0\0"); [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static object[] CreateTestDataEntry(byte[] methodData, HttpMethod expectedMethod, int expectedLength, bool expectedResult) + private static object[] CreateTestDataEntry(byte[] methodData, int expectedMethod, int expectedLength, bool expectedResult) { return new object[] { methodData, expectedMethod, expectedLength, expectedResult }; } private static readonly object[][] _testData = new object[][] { - CreateTestDataEntry(_methodGet, HttpMethod.Get, 3, true), - CreateTestDataEntry(_methodPut, HttpMethod.Put, 3, true), - CreateTestDataEntry(_methodPost, HttpMethod.Post, 4, true), - CreateTestDataEntry(_methodHead, HttpMethod.Head, 4, true), - CreateTestDataEntry(_methodTrace, HttpMethod.Trace, 5, true), - CreateTestDataEntry(_methodPatch, HttpMethod.Patch, 5, true), - CreateTestDataEntry(_methodDelete, HttpMethod.Delete, 6, true), - CreateTestDataEntry(_methodConnect, HttpMethod.Connect, 7, true), - CreateTestDataEntry(_methodOptions, HttpMethod.Options, 7, true), - CreateTestDataEntry(_invalidMethod1, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod2, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod3, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod4, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod5, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod6, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod7, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod8, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod9, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod10, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod11, HttpMethod.Custom, 0, false), - CreateTestDataEntry(_invalidMethod12, HttpMethod.Custom, 0, false), + CreateTestDataEntry(_methodGet, (int)HttpMethod.Get, 3, true), + CreateTestDataEntry(_methodPut, (int)HttpMethod.Put, 3, true), + CreateTestDataEntry(_methodPost, (int)HttpMethod.Post, 4, true), + CreateTestDataEntry(_methodHead, (int)HttpMethod.Head, 4, true), + CreateTestDataEntry(_methodTrace, (int)HttpMethod.Trace, 5, true), + CreateTestDataEntry(_methodPatch, (int)HttpMethod.Patch, 5, true), + CreateTestDataEntry(_methodDelete, (int)HttpMethod.Delete, 6, true), + CreateTestDataEntry(_methodConnect, (int)HttpMethod.Connect, 7, true), + CreateTestDataEntry(_methodOptions, (int)HttpMethod.Options, 7, true), + CreateTestDataEntry(_invalidMethod1, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod2, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod3, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod4, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod5, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod6, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod7, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod8, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod9, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod10, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod11, (int)HttpMethod.Custom, 0, false), + CreateTestDataEntry(_invalidMethod12, (int)HttpMethod.Custom, 0, false), }; public static IEnumerable TestData => _testData; [Theory] [MemberData(nameof(TestData), MemberType = typeof(KnownStringsTests))] - public void GetsKnownMethod(byte[] methodData, HttpMethod expectedMethod, int expectedLength, bool expectedResult) + public void GetsKnownMethod(byte[] methodData, int intExpectedMethod, int expectedLength, bool expectedResult) { + var expectedMethod = (HttpMethod)intExpectedMethod; var data = new Span(methodData); var result = data.GetKnownMethod(out var method, out var length); diff --git a/src/Servers/Kestrel/Core/test/MessageBodyTests.cs b/src/Servers/Kestrel/Core/test/MessageBodyTests.cs index bd11ad9d81f5..e4e44978af69 100644 --- a/src/Servers/Kestrel/Core/test/MessageBodyTests.cs +++ b/src/Servers/Kestrel/Core/test/MessageBodyTests.cs @@ -20,10 +20,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests public class MessageBodyTests { [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanReadFromContentLength(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanReadFromContentLength(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -49,10 +50,11 @@ public async Task CanReadFromContentLength(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanReadFromContentLengthPipeApis(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanReadFromContentLengthPipeApis(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -76,10 +78,11 @@ public async Task CanReadFromContentLengthPipeApis(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanTryReadFromContentLengthPipeApis(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanTryReadFromContentLengthPipeApis(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -102,10 +105,11 @@ public async Task CanTryReadFromContentLengthPipeApis(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task ReadAsyncWithoutAdvanceFromContentLengthThrows(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task ReadAsyncWithoutAdvanceFromContentLengthThrows(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -122,10 +126,11 @@ public async Task ReadAsyncWithoutAdvanceFromContentLengthThrows(HttpVersion htt } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task TryReadWithoutAdvanceFromContentLengthThrows(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task TryReadWithoutAdvanceFromContentLengthThrows(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -142,10 +147,11 @@ public async Task TryReadWithoutAdvanceFromContentLengthThrows(HttpVersion httpV } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanReadAsyncFromContentLength(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanReadAsyncFromContentLength(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderContentLength = "5" }, input.Http1Connection); @@ -392,10 +398,11 @@ public async Task ReadThrowsGivenChunkPrefixGreaterThan8Bytes() } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanReadFromRemainingData(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanReadFromRemainingData(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderConnection = "upgrade" }, input.Http1Connection); @@ -420,10 +427,11 @@ public async Task CanReadFromRemainingData(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task CanReadAsyncFromRemainingData(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task CanReadAsyncFromRemainingData(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders { HeaderConnection = "upgrade" }, input.Http1Connection); @@ -446,10 +454,11 @@ public async Task CanReadAsyncFromRemainingData(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task ReadFromNoContentLengthReturnsZero(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task ReadFromNoContentLengthReturnsZero(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders(), input.Http1Connection); @@ -470,10 +479,11 @@ public async Task ReadFromNoContentLengthReturnsZero(HttpVersion httpVersion) } [Theory] - [InlineData(HttpVersion.Http10)] - [InlineData(HttpVersion.Http11)] - public async Task ReadAsyncFromNoContentLengthReturnsZero(HttpVersion httpVersion) + [InlineData((int)HttpVersion.Http10)] + [InlineData((int)HttpVersion.Http11)] + public async Task ReadAsyncFromNoContentLengthReturnsZero(int intHttpVersion) { + var httpVersion = (HttpVersion)intHttpVersion; using (var input = new TestInput()) { var body = Http1MessageBody.For(httpVersion, new HttpRequestHeaders(), input.Http1Connection); @@ -535,10 +545,11 @@ public void ForThrowsWhenFinalTransferCodingIsNotChunked() } [Theory] - [InlineData(HttpMethod.Post)] - [InlineData(HttpMethod.Put)] - public void ForThrowsWhenMethodRequiresLengthButNoContentLengthOrTransferEncodingIsSet(HttpMethod method) + [InlineData((int)HttpMethod.Post)] + [InlineData((int)HttpMethod.Put)] + public void ForThrowsWhenMethodRequiresLengthButNoContentLengthOrTransferEncodingIsSet(int intMethod) { + var method = (HttpMethod)intMethod; using (var input = new TestInput()) { input.Http1Connection.Method = method; @@ -551,10 +562,11 @@ public void ForThrowsWhenMethodRequiresLengthButNoContentLengthOrTransferEncodin } [Theory] - [InlineData(HttpMethod.Post)] - [InlineData(HttpMethod.Put)] - public void ForThrowsWhenMethodRequiresLengthButNoContentLengthSetHttp10(HttpMethod method) + [InlineData((int)HttpMethod.Post)] + [InlineData((int)HttpMethod.Put)] + public void ForThrowsWhenMethodRequiresLengthButNoContentLengthSetHttp10(int intMethod) { + var method = (HttpMethod)intMethod; using (var input = new TestInput()) { input.Http1Connection.Method = method; diff --git a/src/Servers/Kestrel/Transport.Abstractions/src/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/Transport.Abstractions/src/Properties/AssemblyInfo.cs index e93c12aecdc0..fe6f597c72ed 100644 --- a/src/Servers/Kestrel/Transport.Abstractions/src/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/Transport.Abstractions/src/Properties/AssemblyInfo.cs @@ -3,8 +3,12 @@ using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Core, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Core.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Performance, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Sockets.FunctionalTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Libuv.FunctionalTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs b/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs index ef602e84d1d9..8e37f8714db2 100644 --- a/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs +++ b/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs @@ -17,441 +17,3 @@ public LibuvTransportOptions() { } public int ThreadCount { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } } -namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal -{ - public partial interface ILibuvTrace : Microsoft.Extensions.Logging.ILogger - { - void ConnectionError(string connectionId, System.Exception ex); - void ConnectionPause(string connectionId); - void ConnectionRead(string connectionId, int count); - void ConnectionReadFin(string connectionId); - void ConnectionReset(string connectionId); - void ConnectionResume(string connectionId); - void ConnectionWrite(string connectionId, int count); - void ConnectionWriteCallback(string connectionId, int status); - void ConnectionWriteFin(string connectionId, string reason); - } - public partial class LibuvAwaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion where TRequest : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest - { - public static readonly System.Action Callback; - public LibuvAwaitable() { } - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvAwaitable GetAwaiter() { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.UvWriteResult GetResult() { throw null; } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - public partial class LibuvConnection : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection, System.IDisposable - { - public LibuvConnection(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle socket, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace log, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread, System.Net.IPEndPoint remoteEndPoint, System.Net.IPEndPoint localEndPoint) { } - public override System.IO.Pipelines.PipeScheduler InputWriterScheduler { get { throw null; } } - public override System.Buffers.MemoryPool MemoryPool { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvOutputConsumer OutputConsumer { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override System.IO.Pipelines.PipeScheduler OutputReaderScheduler { get { throw null; } } - public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { } - public void Dispose() { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task Start() { throw null; } - } - public partial class LibuvOutputConsumer - { - public LibuvOutputConsumer(System.IO.Pipelines.PipeReader pipe, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle socket, string connectionId, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace log) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task WriteOutputAsync() { throw null; } - } - public partial class LibuvThread : System.IO.Pipelines.PipeScheduler - { - public LibuvThread(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport transport) { } - public LibuvThread(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransport transport, int maxLoops) { } - public System.Exception FatalError { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle Loop { get { throw null; } } - public System.Buffers.MemoryPool MemoryPool { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Action, System.IntPtr> QueueCloseHandle { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Collections.Generic.List Requests { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.WriteReqPool WriteReqPool { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public System.Threading.Tasks.Task PostAsync(System.Action callback, T state) { throw null; } - public void Post(System.Action callback, T state) { } - public override void Schedule(System.Action action, object state) { } - public System.Threading.Tasks.Task StartAsync() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync(System.TimeSpan timeout) { throw null; } - public void Walk(System.Action callback) { } - } - public partial class LibuvTrace : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace, Microsoft.Extensions.Logging.ILogger - { - public LibuvTrace(Microsoft.Extensions.Logging.ILogger logger) { } - public System.IDisposable BeginScope(TState state) { throw null; } - public void ConnectionError(string connectionId, System.Exception ex) { } - public void ConnectionPause(string connectionId) { } - public void ConnectionRead(string connectionId, int count) { } - public void ConnectionReadFin(string connectionId) { } - public void ConnectionReset(string connectionId) { } - public void ConnectionResume(string connectionId) { } - public void ConnectionWrite(string connectionId, int count) { } - public void ConnectionWriteCallback(string connectionId, int status) { } - public void ConnectionWriteFin(string connectionId, string reason) { } - public bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) { throw null; } - public void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) { } - } - public partial class LibuvTransport : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransport - { - public LibuvTransport(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext context, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation) { } - public LibuvTransport(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions uv, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext context, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation) { } - public Microsoft.Extensions.Hosting.IHostApplicationLifetime AppLifetime { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions Libuv { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace Log { get { throw null; } } - public System.Collections.Generic.List Threads { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext TransportContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.LibuvTransportOptions TransportOptions { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task BindAsync() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task UnbindAsync() { throw null; } - } - public partial class LibuvTransportContext - { - public LibuvTransportContext() { } - public Microsoft.Extensions.Hosting.IHostApplicationLifetime AppLifetime { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IConnectionDispatcher ConnectionDispatcher { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace Log { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.LibuvTransportOptions Options { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - } - public partial class LibuvTransportFactory : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransportFactory - { - public LibuvTransportFactory(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransport Create(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IConnectionDispatcher dispatcher) { throw null; } - } - public partial class Listener : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ListenerContext - { - public Listener(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext transportContext) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext)) { } - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle ListenSocket { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace Log { get { throw null; } } - protected virtual void DispatchConnection(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle socket) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public virtual System.Threading.Tasks.Task DisposeAsync() { throw null; } - public System.Threading.Tasks.Task StartAsync(Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { throw null; } - } - public partial class ListenerContext - { - public ListenerContext(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext transportContext) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation EndPointInformation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread Thread { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext TransportContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle CreateAcceptSocket() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - protected System.Threading.Tasks.Task HandleConnectionAsync(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle socket) { throw null; } - } - public partial class ListenerPrimary : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Listener - { - public ListenerPrimary(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext transportContext) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext)) { } - public int UvPipeCount { get { throw null; } } - protected override void DispatchConnection(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle socket) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.Task DisposeAsync() { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(string pipeName, byte[] pipeMessage, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { throw null; } - } - public partial class ListenerSecondary : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ListenerContext - { - public ListenerSecondary(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext transportContext) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvTransportContext)) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace Log { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task DisposeAsync() { throw null; } - public System.Threading.Tasks.Task StartAsync(string pipeName, byte[] pipeMessage, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation endPointInformation, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct UvWriteResult - { - private object _dummy; - private int _dummyPrimitive; - public UvWriteResult(int status, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException error) { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException Error { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public partial class WriteReqPool - { - public WriteReqPool(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace log) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvWriteReq Allocate() { throw null; } - public void Dispose() { } - public void Return(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvWriteReq req) { } - } -} -namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking -{ - public partial class LibuvFunctions - { - public readonly bool IsWindows; - protected System.Func _uv_accept; - protected System.Func _uv_async_init; - protected System.Func _uv_async_send; - protected System.Action _uv_close; - protected System.Func _uv_err_name; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_fileno_func _uv_fileno; - protected System.Func _uv_handle_size; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_ip4_addr_func _uv_ip4_addr; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_ip6_addr_func _uv_ip6_addr; - protected System.Func _uv_listen; - protected System.Func _uv_loop_close; - protected System.Func _uv_loop_init; - protected System.Func _uv_loop_size; - protected System.Func _uv_now; - protected System.Func _uv_pipe_bind; - protected System.Action _uv_pipe_connect; - protected System.Func _uv_pipe_init; - protected System.Func _uv_pipe_open; - protected System.Func _uv_pipe_pending_count; - protected System.Func _uv_read_start; - protected System.Func _uv_read_stop; - protected System.Action _uv_ref; - protected System.Func _uv_req_size; - protected System.Func _uv_run; - protected System.Action _uv_stop; - protected System.Func _uv_strerror; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_tcp_bind_func _uv_tcp_bind; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_tcp_getpeername_func _uv_tcp_getpeername; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_tcp_getsockname_func _uv_tcp_getsockname; - protected System.Func _uv_tcp_init; - protected System.Func _uv_tcp_nodelay; - protected System.Func _uv_tcp_open; - protected System.Func _uv_timer_init; - protected System.Func _uv_timer_start; - protected System.Func _uv_timer_stop; - protected System.Func _uv_try_write; - protected System.Action _uv_unref; - protected System.Func _uv_unsafe_async_send; - protected System.Func _uv_walk; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write_func _uv_write; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write2_func _uv_write2; - public LibuvFunctions() { } - public LibuvFunctions(bool onlyForTesting) { } - public void accept(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle server, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle client) { } - public void async_init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvAsyncHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_async_cb cb) { } - public void async_send(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvAsyncHandle handle) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t buf_init(System.IntPtr memory, int len) { throw null; } - public void Check(int statusCode, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException error) { throw null; } - public void close(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_close_cb close_cb) { } - public void close(System.IntPtr handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_close_cb close_cb) { } - public string err_name(int err) { throw null; } - public int handle_size(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.HandleType handleType) { throw null; } - public void ip4_addr(string ip, int port, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException error) { throw null; } - public void ip6_addr(string ip, int port, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException error) { throw null; } - public void listen(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, int backlog, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_connection_cb cb) { } - public void loop_close(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle handle) { } - public void loop_init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle handle) { } - public int loop_size() { throw null; } - public long now(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop) { throw null; } - public void pipe_bind(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle handle, string name) { } - public void pipe_connect(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvConnectRequest req, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle handle, string name, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_connect_cb cb) { } - public void pipe_init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle handle, bool ipc) { } - public void pipe_open(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle handle, System.IntPtr hSocket) { } - public int pipe_pending_count(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle handle) { throw null; } - public void read_start(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_alloc_cb alloc_cb, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_read_cb read_cb) { } - public void read_stop(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle) { } - public void @ref(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle handle) { } - public int req_size(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.RequestType reqType) { throw null; } - public void run(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle handle, int mode) { } - public void stop(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle handle) { } - public string strerror(int err) { throw null; } - public void tcp_bind(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, ref Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, int flags) { } - public void tcp_getpeername(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, ref int namelen) { throw null; } - public void tcp_getsockname(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, ref int namelen) { throw null; } - public void tcp_init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle) { } - public void tcp_nodelay(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, bool enable) { } - public void tcp_open(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, System.IntPtr hSocket) { } - public void ThrowIfErrored(int statusCode) { } - public void timer_init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTimerHandle handle) { } - public void timer_start(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTimerHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_timer_cb cb, long timeout, long repeat) { } - public void timer_stop(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTimerHandle handle) { } - public int try_write(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t[] bufs, int nbufs) { throw null; } - public void unref(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle handle) { } - public void unsafe_async_send(System.IntPtr handle) { } - public void uv_fileno(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle handle, ref System.IntPtr socket) { } - public void walk(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_walk_cb walk_cb, System.IntPtr arg) { } - public unsafe void write(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest req, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t* bufs, int nbufs, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write_cb cb) { } - public unsafe void write2(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest req, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t* bufs, int nbufs, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle sendHandle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write_cb cb) { } - public enum HandleType - { - ASYNC = 1, - CHECK = 2, - FS_EVENT = 3, - FS_POLL = 4, - HANDLE = 5, - IDLE = 6, - NAMED_PIPE = 7, - POLL = 8, - PREPARE = 9, - PROCESS = 10, - SIGNAL = 16, - STREAM = 11, - TCP = 12, - TIMER = 13, - TTY = 14, - UDP = 15, - Unknown = 0, - } - public enum RequestType - { - CONNECT = 2, - FS = 6, - GETADDRINFO = 8, - GETNAMEINFO = 9, - REQ = 1, - SHUTDOWN = 4, - UDP_SEND = 5, - Unknown = 0, - WORK = 7, - WRITE = 3, - } - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_alloc_cb(System.IntPtr server, int suggested_size, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t buf); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_async_cb(System.IntPtr handle); - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct uv_buf_t - { - private int _dummyPrimitive; - public uv_buf_t(System.IntPtr memory, int len, bool IsWindows) { throw null; } - } - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_close_cb(System.IntPtr handle); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_connection_cb(System.IntPtr server, int status); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_connect_cb(System.IntPtr req, int status); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - protected delegate int uv_fileno_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle handle, ref System.IntPtr socket); - protected delegate int uv_ip4_addr_func(string ip, int port, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr); - protected delegate int uv_ip6_addr_func(string ip, int port, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_read_cb(System.IntPtr server, int nread, ref Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t buf); - protected delegate int uv_tcp_bind_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, ref Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, int flags); - public delegate int uv_tcp_getpeername_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, ref int namelen); - public delegate int uv_tcp_getsockname_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvTcpHandle handle, out Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.SockAddr addr, ref int namelen); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_timer_cb(System.IntPtr handle); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_walk_cb(System.IntPtr handle, System.IntPtr arg); - protected unsafe delegate int uv_write2_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest req, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t* bufs, int nbufs, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle sendHandle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write_cb cb); - [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)] - public delegate void uv_write_cb(System.IntPtr req, int status); - protected unsafe delegate int uv_write_func(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest req, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t* bufs, int nbufs, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_write_cb cb); - } - public static partial class PlatformApis - { - public static bool IsDarwin { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static bool IsWindows { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public static long VolatileRead(ref long value) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct SockAddr - { - private int _dummyPrimitive; - public SockAddr(long ignored) { throw null; } - public uint ScopeId { get { throw null; } set { } } - public System.Net.IPEndPoint GetIPEndPoint() { throw null; } - } - public partial class UvAsyncHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle - { - public UvAsyncHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, System.Action callback, System.Action, System.IntPtr> queueCloseHandle) { } - protected override bool ReleaseHandle() { throw null; } - public void Send() { } - } - public partial class UvConnectRequest : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest - { - public UvConnectRequest(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Connect(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvPipeHandle pipe, string name, System.Action callback, object state) { } - public void DangerousInit(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop) { } - public override void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { } - } - public partial class UvException : System.Exception - { - public UvException(string message, int statusCode) { } - public int StatusCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public abstract partial class UvHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvMemory - { - protected UvHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace), default(System.Runtime.InteropServices.GCHandleType)) { } - protected void CreateHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions uv, int threadId, int size, System.Action, System.IntPtr> queueCloseHandle) { } - public void Reference() { } - protected override bool ReleaseHandle() { throw null; } - public void Unreference() { } - } - public partial class UvLoopHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvMemory - { - public UvLoopHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace), default(System.Runtime.InteropServices.GCHandleType)) { } - public void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions uv) { } - public long Now() { throw null; } - protected override bool ReleaseHandle() { throw null; } - public void Run(int mode = 0) { } - public void Stop() { } - } - public abstract partial class UvMemory : System.Runtime.InteropServices.SafeHandle - { - protected readonly Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace _log; - protected int _threadId; - protected Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions _uv; - protected UvMemory(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger, System.Runtime.InteropServices.GCHandleType handleType = System.Runtime.InteropServices.GCHandleType.Weak) : base (default(System.IntPtr), default(bool)) { } - public override bool IsInvalid { get { throw null; } } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions Libuv { get { throw null; } } - public int ThreadId { get { throw null; } } - protected void CreateMemory(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions uv, int threadId, int size) { } - protected static void DestroyMemory(System.IntPtr memory) { } - protected static void DestroyMemory(System.IntPtr memory, System.IntPtr gcHandlePtr) { } - public static THandle FromIntPtr(System.IntPtr handle) { throw null; } - public System.IntPtr InternalGetHandle() { throw null; } - public void Validate(bool closed = false) { } - } - public partial class UvPipeHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle - { - public UvPipeHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Bind(string name) { } - public void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, System.Action, System.IntPtr> queueCloseHandle, bool ipc = false) { } - public void Open(System.IntPtr fileDescriptor) { } - public int PendingCount() { throw null; } - } - public partial class UvRequest : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvMemory - { - protected UvRequest(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace), default(System.Runtime.InteropServices.GCHandleType)) { } - public virtual void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { } - protected override bool ReleaseHandle() { throw null; } - } - public abstract partial class UvStreamHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle - { - protected UvStreamHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Accept(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle) { } - public void Listen(int backlog, System.Action callback, object state) { } - public void ReadStart(System.Func allocCallback, System.Action readCallback, object state) { } - public void ReadStop() { } - protected override bool ReleaseHandle() { throw null; } - public int TryWrite(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.uv_buf_t buf) { throw null; } - } - public partial class UvTcpHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle - { - public UvTcpHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Bind(System.Net.IPEndPoint endPoint) { } - public System.Net.IPEndPoint GetPeerIPEndPoint() { throw null; } - public System.Net.IPEndPoint GetSockIPEndPoint() { throw null; } - public void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, System.Action, System.IntPtr> queueCloseHandle) { } - public void NoDelay(bool enable) { } - public void Open(System.IntPtr fileDescriptor) { } - } - public partial class UvTimerHandle : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle - { - public UvTimerHandle(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop, System.Action, System.IntPtr> queueCloseHandle) { } - public void Start(System.Action callback, long timeout, long repeat) { } - public void Stop() { } - } - public partial class UvWriteReq : Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvRequest - { - public UvWriteReq(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace logger) : base (default(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.ILibuvTrace)) { } - public void DangerousInit(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvLoopHandle loop) { } - public override void Init(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread thread) { } - public void Write2(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, System.ArraySegment> bufs, Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle sendHandle, System.Action callback, object state) { } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvAwaitable WriteAsync(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, System.ArraySegment> bufs) { throw null; } - public Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvAwaitable WriteAsync(Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvStreamHandle handle, System.Buffers.ReadOnlySequence buffer) { throw null; } - } -} diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs index 51394bc4c70f..18ca39508153 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public interface ILibuvTrace : ILogger + internal interface ILibuvTrace : ILogger { void ConnectionRead(string connectionId, int count); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvAwaitable.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvAwaitable.cs index b4d40dea296b..8435a6cb3221 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvAwaitable.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvAwaitable.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvAwaitable : ICriticalNotifyCompletion where TRequest : UvRequest + internal class LibuvAwaitable : ICriticalNotifyCompletion where TRequest : UvRequest { private readonly static Action _callbackCompleted = () => { }; @@ -70,7 +70,7 @@ public void UnsafeOnCompleted(Action continuation) } } - public struct UvWriteResult + internal struct UvWriteResult { public int Status { get; } public UvException Error { get; } diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs index 428860737fc5..b0f61c8023d0 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public partial class LibuvConnection : TransportConnection, IDisposable + internal partial class LibuvConnection : TransportConnection, IDisposable { private static readonly int MinAllocBufferSize = KestrelMemoryPool.MinimumSegmentSize / 2; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvOutputConsumer.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvOutputConsumer.cs index b488cbcce666..943824ad4610 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvOutputConsumer.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvOutputConsumer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvOutputConsumer + internal class LibuvOutputConsumer { private readonly LibuvThread _thread; private readonly UvStreamHandle _socket; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvThread.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvThread.cs index 2cb5f4de952d..9d50eb5f6778 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvThread.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvThread.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvThread : PipeScheduler + internal class LibuvThread : PipeScheduler { // maximum times the work queues swapped and are processed in a single pass // as completing a task may immediately have write data to put on the network diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs index cef5b8e119ed..5ba4844d5fdc 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvTrace : ILibuvTrace + internal class LibuvTrace : ILibuvTrace { // ConnectionRead: Reserved: 3 diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransport.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransport.cs index d07d51d116fb..4bbeae88f13f 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransport.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransport.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking; @@ -14,7 +13,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvTransport : ITransport + internal class LibuvTransport : ITransport { private readonly IEndPointInformation _endPointInformation; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportContext.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportContext.cs index 5baff8faab7b..7f9e1d62f900 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportContext.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportContext.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvTransportContext + internal class LibuvTransportContext { public LibuvTransportOptions Options { get; set; } diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportFactory.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportFactory.cs index 92546939798b..485582355d45 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportFactory.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTransportFactory.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class LibuvTransportFactory : ITransportFactory + internal class LibuvTransportFactory : ITransportFactory { private readonly LibuvTransportContext _baseTransportContext; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Listener.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Listener.cs index e2c392d02d28..010a84e00660 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Listener.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Listener.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal /// /// Base class for listeners in Kestrel. Listens for incoming connections /// - public class Listener : ListenerContext, IAsyncDisposable + internal class Listener : ListenerContext, IAsyncDisposable { private bool _closed; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs index 1a822dec7b27..e153565af80a 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class ListenerContext + internal class ListenerContext { public ListenerContext(LibuvTransportContext transportContext) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs index 71442c865056..4ce0afab29be 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal /// A primary listener waits for incoming connections on a specified socket. Incoming /// connections may be passed to a secondary listener to handle. /// - public class ListenerPrimary : Listener + internal class ListenerPrimary : Listener { // The list of pipes that can be dispatched to (where we've confirmed the _pipeMessage) private readonly List _dispatchPipes = new List(); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerSecondary.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerSecondary.cs index 3547047add20..6597df28d77d 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerSecondary.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerSecondary.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal /// A secondary listener is delegated requests from a primary listener via a named pipe or /// UNIX domain socket. /// - public class ListenerSecondary : ListenerContext, IAsyncDisposable + internal class ListenerSecondary : ListenerContext, IAsyncDisposable { private string _pipeName; private byte[] _pipeMessage; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/LibuvFunctions.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/LibuvFunctions.cs index 02596aa9ba58..4fb0a2b7e898 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/LibuvFunctions.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/LibuvFunctions.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class LibuvFunctions + internal class LibuvFunctions { public LibuvFunctions() { @@ -631,4 +631,4 @@ IntPtr lpCompletionRoutine public static extern int WSAGetLastError(); } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/PlatformApis.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/PlatformApis.cs index ffc7619d736d..fd5003f0c79c 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/PlatformApis.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/PlatformApis.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public static class PlatformApis + internal static class PlatformApis { public static bool IsWindows { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/SockAddr.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/SockAddr.cs index 837bc1fa9964..45673ff6ce7d 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/SockAddr.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/SockAddr.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { [StructLayout(LayoutKind.Sequential)] - public struct SockAddr + internal struct SockAddr { // this type represents native memory occupied by sockaddr struct // https://msdn.microsoft.com/en-us/library/windows/desktop/ms740496(v=vs.85).aspx diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvAsyncHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvAsyncHandle.cs index d68a79c4caa9..66a9ce4ffc53 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvAsyncHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvAsyncHandle.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvAsyncHandle : UvHandle + internal class UvAsyncHandle : UvHandle { private static readonly LibuvFunctions.uv_close_cb _destroyMemory = (handle) => DestroyMemory(handle); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvConnectRequest.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvConnectRequest.cs index 75c58b543447..1339c1089ec6 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvConnectRequest.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvConnectRequest.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin /// /// Summary description for UvWriteRequest /// - public class UvConnectRequest : UvRequest + internal class UvConnectRequest : UvRequest { private readonly static LibuvFunctions.uv_connect_cb _uv_connect_cb = (req, status) => UvConnectCb(req, status); @@ -75,4 +75,4 @@ private static void UvConnectCb(IntPtr ptr, int status) } } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvException.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvException.cs index fa7c4087fe63..8a8b2d329a40 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvException.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvException.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvException : Exception + internal class UvException : Exception { public UvException(string message, int statusCode) : base(message) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvHandle.cs index 0f33eee7c331..e35aa09ef6d7 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvHandle.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public abstract class UvHandle : UvMemory + internal abstract class UvHandle : UvMemory { private static readonly LibuvFunctions.uv_close_cb _destroyMemory = (handle) => DestroyMemory(handle); private Action, IntPtr> _queueCloseHandle; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvLoopHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvLoopHandle.cs index c1a47d163dce..564ec49b4d52 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvLoopHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvLoopHandle.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvLoopHandle : UvMemory + internal class UvLoopHandle : UvMemory { public UvLoopHandle(ILibuvTrace logger) : base(logger) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvMemory.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvMemory.cs index 9454e6fc239f..b14dd7ad01be 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvMemory.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvMemory.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin /// /// Summary description for UvMemory /// - public abstract class UvMemory : SafeHandle + internal abstract class UvMemory : SafeHandle { protected LibuvFunctions _uv; protected int _threadId; @@ -90,4 +90,4 @@ unsafe public static THandle FromIntPtr(IntPtr handle) return (THandle)gcHandle.Target; } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvPipeHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvPipeHandle.cs index 9afdb6771278..becc9c713f25 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvPipeHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvPipeHandle.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvPipeHandle : UvStreamHandle + internal class UvPipeHandle : UvStreamHandle { public UvPipeHandle(ILibuvTrace logger) : base(logger) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvRequest.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvRequest.cs index e11b1aaadf69..97be0abf775d 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvRequest.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvRequest.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvRequest : UvMemory + internal class UvRequest : UvMemory { protected UvRequest(ILibuvTrace logger) : base(logger, GCHandleType.Normal) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvStreamHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvStreamHandle.cs index d847512fda40..5f679f6451e2 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvStreamHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvStreamHandle.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public abstract class UvStreamHandle : UvHandle + internal abstract class UvStreamHandle : UvHandle { private readonly static LibuvFunctions.uv_connection_cb _uv_connection_cb = (handle, status) => UvConnectionCb(handle, status); // Ref and out lamda params must be explicitly typed diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTcpHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTcpHandle.cs index cd191540d560..207be3c56487 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTcpHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTcpHandle.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvTcpHandle : UvStreamHandle + internal class UvTcpHandle : UvStreamHandle { public UvTcpHandle(ILibuvTrace logger) : base(logger) { diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTimerHandle.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTimerHandle.cs index 85547e7d69fb..df500edad38e 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTimerHandle.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvTimerHandle.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking { - public class UvTimerHandle : UvHandle + internal class UvTimerHandle : UvHandle { private readonly static LibuvFunctions.uv_timer_cb _uv_timer_cb = UvTimerCb; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvWriteReq.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvWriteReq.cs index e28c3186166e..5d71426c8018 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvWriteReq.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/Networking/UvWriteReq.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin /// /// Summary description for UvWriteRequest /// - public class UvWriteReq : UvRequest + internal class UvWriteReq : UvRequest { private static readonly LibuvFunctions.uv_write_cb _uv_write_cb = (IntPtr ptr, int status) => UvWriteCb(ptr, status); diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/WriteReqPool.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/WriteReqPool.cs index cdc612ee4fc0..1e5e1a6c760e 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/WriteReqPool.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/WriteReqPool.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal { - public class WriteReqPool + internal class WriteReqPool { private const int _maxPooledWriteReqs = 1024; diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/Transport.Libuv/src/Properties/AssemblyInfo.cs index 62b3dccbef8b..fbc1f7fe60d0 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/Transport.Libuv/src/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/MockLibuv.cs b/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/MockLibuv.cs index 6cb3f6917ad2..66e120b69242 100644 --- a/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/MockLibuv.cs +++ b/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/MockLibuv.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers { - public class MockLibuv : LibuvFunctions + internal class MockLibuv : LibuvFunctions { private UvAsyncHandle _postHandle; private uv_async_cb _onPost; diff --git a/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/TestLibuvTransportContext.cs b/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/TestLibuvTransportContext.cs index c779b8764782..155c31b2ebcf 100644 --- a/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/TestLibuvTransportContext.cs +++ b/src/Servers/Kestrel/Transport.Libuv/test/TestHelpers/TestLibuvTransportContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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.Server.Kestrel.Transport.Libuv.Internal; @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers { - public class TestLibuvTransportContext : LibuvTransportContext + internal class TestLibuvTransportContext : LibuvTransportContext { public TestLibuvTransportContext() { diff --git a/src/Servers/Kestrel/Transport.Sockets/src/baseline.netcore.json b/src/Servers/Kestrel/Transport.Sockets/src/baseline.netcore.json index ce272e8c7844..73d321df08e2 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/baseline.netcore.json +++ b/src/Servers/Kestrel/Transport.Sockets/src/baseline.netcore.json @@ -53,7 +53,7 @@ "Kind": "Class", "Sealed": true, "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransportFactory" + "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.ITransportFactory" ], "Members": [ { @@ -62,17 +62,17 @@ "Parameters": [ { "Name": "endPointInformation", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IEndPointInformation" }, { "Name": "dispatcher", - "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IConnectionDispatcher" + "Type": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.IConnectionDispatcher" } ], - "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransport", + "ReturnType": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.ITransport", "Sealed": true, "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ITransportFactory", + "ImplementedInterface": "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.ITransportFactory", "Visibility": "Public", "GenericParameter": [] }, diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/ErrorUtilities.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/ErrorUtilities.cs index 32ae14d57121..89377f06aeb8 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/ErrorUtilities.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/ErrorUtilities.cs @@ -1,4 +1,7 @@ -using System; +// 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 System; namespace Microsoft.AspNetCore.Server.Kestrel.Performance { diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionBenchmark.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionBenchmark.cs index 78defbe0b08b..27023e0af541 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionBenchmark.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionBenchmark.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -22,7 +22,7 @@ public class Http1ConnectionBenchmark private ReadOnlySequence _buffer; - public Http1Connection Connection { get; set; } + internal Http1Connection Connection { get; set; } [GlobalSetup] public void Setup() @@ -111,4 +111,4 @@ public void OnStartLine(HttpMethod method, HttpVersion version, Span targe => RequestHandler.Connection.OnStartLine(method, version, target, path, query, customMethod, pathEncoded); } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionParsingOverheadBenchmark.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionParsingOverheadBenchmark.cs index c9da214414f3..75bc42034343 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionParsingOverheadBenchmark.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/Http1ConnectionParsingOverheadBenchmark.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Buffers; @@ -18,7 +18,7 @@ public class Http1ConnectionParsingOverheadBenchmark private const int InnerLoopCount = 512; public ReadOnlySequence _buffer; - public Http1Connection _http1Connection; + private Http1Connection _http1Connection; [IterationSetup] public void Setup() diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/HttpParserBenchmark.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/HttpParserBenchmark.cs index bb14ffb53785..1fab96121bb9 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/HttpParserBenchmark.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/HttpParserBenchmark.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance { - public class HttpParserBenchmark : IHttpRequestLineHandler, IHttpHeadersHandler + internal class HttpParserBenchmark : IHttpRequestLineHandler, IHttpHeadersHandler { private readonly HttpParser _parser = new HttpParser(); diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/InMemoryTransportBenchmark.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/InMemoryTransportBenchmark.cs index 8242f3ba17ee..d5421ab448af 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/InMemoryTransportBenchmark.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/InMemoryTransportBenchmark.cs @@ -1,12 +1,6 @@ // 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 BenchmarkDotNet.Attributes; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; -using Microsoft.Extensions.DependencyInjection; using System; using System.Buffers; using System.Collections.Generic; @@ -14,6 +8,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using BenchmarkDotNet.Attributes; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; +using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Server.Kestrel.Performance { @@ -94,7 +94,7 @@ public async Task PlaintextPipelined() await _connection.ReadResponseAsync(_plaintextPipelinedExpectedResponse.Length); } - public class InMemoryTransportFactory : ITransportFactory + internal class InMemoryTransportFactory : ITransportFactory { private readonly int _connectionsPerEndPoint; diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/MockTrace.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/MockTrace.cs index a98cfaf7f86d..77132f4b4a0c 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/MockTrace.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/MockTrace.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance { - public class MockTrace : IKestrelTrace + internal class MockTrace : IKestrelTrace { public void ApplicationError(string connectionId, string requestId, Exception ex) { } public IDisposable BeginScope(TState state) => null; diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/NullParser.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/NullParser.cs index 556eaa7dbbef..fc190bbafb2c 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/NullParser.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/Mocks/NullParser.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance { - public class NullParser : IHttpParser where TRequestHandler : struct, IHttpHeadersHandler, IHttpRequestLineHandler + internal class NullParser : IHttpParser where TRequestHandler : struct, IHttpHeadersHandler, IHttpRequestLineHandler { private readonly byte[] _startLine = Encoding.ASCII.GetBytes("GET /plaintext HTTP/1.1\r\n"); private readonly byte[] _target = Encoding.ASCII.GetBytes("/plaintext"); diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/RequestParsingBenchmark.cs b/src/Servers/Kestrel/perf/Kestrel.Performance/RequestParsingBenchmark.cs index efb11e5c9fcc..33ae90daeb93 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/RequestParsingBenchmark.cs +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/RequestParsingBenchmark.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Buffers; @@ -19,7 +19,7 @@ public class RequestParsingBenchmark public Pipe Pipe { get; set; } - public Http1Connection Http1Connection { get; set; } + internal Http1Connection Http1Connection { get; set; } [IterationSetup] public void Setup() diff --git a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs index 486db3987a21..b632cca8ec26 100644 --- a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs +++ b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs @@ -4,7 +4,6 @@ using System; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Server.Kestrel.Core; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; @@ -12,7 +11,7 @@ namespace Microsoft.AspNetCore.Testing { - public class CompositeKestrelTrace: IKestrelTrace + internal class CompositeKestrelTrace: IKestrelTrace { private readonly IKestrelTrace _trace1; private readonly IKestrelTrace _trace2; diff --git a/src/Servers/Kestrel/shared/test/EventRaisingResourceCounter.cs b/src/Servers/Kestrel/shared/test/EventRaisingResourceCounter.cs index 8f7d5efea31e..f5333d614681 100644 --- a/src/Servers/Kestrel/shared/test/EventRaisingResourceCounter.cs +++ b/src/Servers/Kestrel/shared/test/EventRaisingResourceCounter.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests { - public class EventRaisingResourceCounter : ResourceCounter + internal class EventRaisingResourceCounter : ResourceCounter { private readonly ResourceCounter _wrapped; diff --git a/src/Servers/Kestrel/shared/test/HttpParsingData.cs b/src/Servers/Kestrel/shared/test/HttpParsingData.cs index 8d7e2a7fa943..68a8c4857bce 100644 --- a/src/Servers/Kestrel/shared/test/HttpParsingData.cs +++ b/src/Servers/Kestrel/shared/test/HttpParsingData.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -277,7 +277,7 @@ public static TheoryData TargetInvalidData } } - public static TheoryData MethodNotAllowedRequestLine + public static TheoryData MethodNotAllowedRequestLine { get { @@ -295,16 +295,16 @@ public static TheoryData MethodNotAllowedRequestLine "CUSTOM", }; - var data = new TheoryData(); + var data = new TheoryData(); foreach (var method in methods.Except(new[] { "OPTIONS" })) { - data.Add($"{method} * HTTP/1.1\r\n", HttpMethod.Options); + data.Add($"{method} * HTTP/1.1\r\n", (int)HttpMethod.Options); } foreach (var method in methods.Except(new[] { "CONNECT" })) { - data.Add($"{method} www.example.com:80 HTTP/1.1\r\n", HttpMethod.Connect); + data.Add($"{method} www.example.com:80 HTTP/1.1\r\n", (int)HttpMethod.Connect); } return data; diff --git a/src/Servers/Kestrel/shared/test/TestHttp1Connection.cs b/src/Servers/Kestrel/shared/test/TestHttp1Connection.cs index 092160e11e14..d1e66da9d2b5 100644 --- a/src/Servers/Kestrel/shared/test/TestHttp1Connection.cs +++ b/src/Servers/Kestrel/shared/test/TestHttp1Connection.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Testing { - public class TestHttp1Connection : Http1Connection + internal class TestHttp1Connection : Http1Connection { public TestHttp1Connection(HttpConnectionContext context) : base(context) diff --git a/src/Servers/Kestrel/shared/test/TestKestrelTrace.cs b/src/Servers/Kestrel/shared/test/TestKestrelTrace.cs index 8e0a469dc7db..0e0148ce2f2b 100644 --- a/src/Servers/Kestrel/shared/test/TestKestrelTrace.cs +++ b/src/Servers/Kestrel/shared/test/TestKestrelTrace.cs @@ -1,11 +1,11 @@ // 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.Server.Kestrel.Core.Internal; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; namespace Microsoft.AspNetCore.Testing { - public class TestKestrelTrace : KestrelTrace + internal class TestKestrelTrace : KestrelTrace { public TestKestrelTrace() : this(new TestApplicationErrorLogger()) { @@ -18,4 +18,4 @@ public TestKestrelTrace(TestApplicationErrorLogger testLogger) : base(testLogger public TestApplicationErrorLogger Logger { get; private set; } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/shared/test/TestServiceContext.cs b/src/Servers/Kestrel/shared/test/TestServiceContext.cs index b0532b874d9c..7b6abf939df5 100644 --- a/src/Servers/Kestrel/shared/test/TestServiceContext.cs +++ b/src/Servers/Kestrel/shared/test/TestServiceContext.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Testing { - public class TestServiceContext : ServiceContext + internal class TestServiceContext : ServiceContext { public TestServiceContext() { diff --git a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs index 30ea7f362365..bbb6d6fe49de 100644 --- a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs +++ b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests /// /// Summary description for TestServer /// - public class TestServer : IDisposable, IStartup + internal class TestServer : IDisposable, IStartup { private IWebHost _host; private ListenOptions _listenOptions; diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 034b9a058aaa..311587deb269 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -11,8 +11,8 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing.xunit; using Moq; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ConnectionAdapterTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ConnectionAdapterTests.cs index 1005dca8ed43..79df18c8d9ca 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/ConnectionAdapterTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/ConnectionAdapterTests.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core; +using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter; using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal; using Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport; using Microsoft.AspNetCore.Testing; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs index 5f90023a99ff..c6b15ca204f9 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs @@ -10,7 +10,6 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack; @@ -1615,10 +1614,11 @@ await WaitForConnectionErrorAsync( } [Theory] - [InlineData(Http2HeadersFrameFlags.NONE)] - [InlineData(Http2HeadersFrameFlags.END_HEADERS)] - public async Task HEADERS_Received_WithTrailers_EndStreamNotSet_ConnectionError(Http2HeadersFrameFlags flags) + [InlineData((int)Http2HeadersFrameFlags.NONE)] + [InlineData((int)Http2HeadersFrameFlags.END_HEADERS)] + public async Task HEADERS_Received_WithTrailers_EndStreamNotSet_ConnectionError(int intFlags) { + var flags = (Http2HeadersFrameFlags)intFlags; await InitializeConnectionAsync(_readTrailersApplication); await SendHeadersAsync(1, Http2HeadersFrameFlags.END_HEADERS, _browserRequestHeaders); @@ -2463,17 +2463,20 @@ await WaitForConnectionErrorAsync( } [Theory] - [InlineData(Http2SettingsParameter.SETTINGS_ENABLE_PUSH, 2, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_ENABLE_PUSH, uint.MaxValue, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE, (uint)int.MaxValue + 1, Http2ErrorCode.FLOW_CONTROL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE, uint.MaxValue, Http2ErrorCode.FLOW_CONTROL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE, 0, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE, 1, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE, 16 * 1024 - 1, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE, 16 * 1024 * 1024, Http2ErrorCode.PROTOCOL_ERROR)] - [InlineData(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE, uint.MaxValue, Http2ErrorCode.PROTOCOL_ERROR)] - public async Task SETTINGS_Received_InvalidParameterValue_ConnectionError(Http2SettingsParameter parameter, uint value, Http2ErrorCode expectedErrorCode) - { + [InlineData((int)(Http2SettingsParameter.SETTINGS_ENABLE_PUSH), 2, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_ENABLE_PUSH), uint.MaxValue, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE), (uint)int.MaxValue + 1, (int)(Http2ErrorCode.FLOW_CONTROL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_INITIAL_WINDOW_SIZE), uint.MaxValue, (int)(Http2ErrorCode.FLOW_CONTROL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE), 0, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE), 1, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE), 16 * 1024 - 1, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE), 16 * 1024 * 1024, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + [InlineData((int)(Http2SettingsParameter.SETTINGS_MAX_FRAME_SIZE), uint.MaxValue, (int)(Http2ErrorCode.PROTOCOL_ERROR))] + public async Task SETTINGS_Received_InvalidParameterValue_ConnectionError(int intParameter, uint value, int intExpectedErrorCode) + { + var parameter = (Http2SettingsParameter)intParameter; + var expectedErrorCode = (Http2ErrorCode)intExpectedErrorCode; + await InitializeConnectionAsync(_noopApplication); await SendSettingsWithInvalidParameterValueAsync(parameter, value); @@ -3852,12 +3855,14 @@ public void UnexpectedExceptionDuringFrameProcessingLoggedAWarning() } [Theory] - [InlineData(Http2FrameType.DATA)] - [InlineData(Http2FrameType.WINDOW_UPDATE)] - [InlineData(Http2FrameType.HEADERS)] - [InlineData(Http2FrameType.CONTINUATION)] - public async Task AppDoesNotReadRequestBody_ResetsAndDrainsRequest(Http2FrameType finalFrameType) + [InlineData((int)(Http2FrameType.DATA))] + [InlineData((int)(Http2FrameType.WINDOW_UPDATE))] + [InlineData((int)(Http2FrameType.HEADERS))] + [InlineData((int)(Http2FrameType.CONTINUATION))] + public async Task AppDoesNotReadRequestBody_ResetsAndDrainsRequest(int intFinalFrameType) { + var finalFrameType = (Http2FrameType)intFinalFrameType; + var headers = new[] { new KeyValuePair(HeaderNames.Method, "POST"), @@ -3905,12 +3910,14 @@ await ExpectAsync(Http2FrameType.DATA, } [Theory] - [InlineData(Http2FrameType.DATA)] - [InlineData(Http2FrameType.WINDOW_UPDATE)] - [InlineData(Http2FrameType.HEADERS)] - [InlineData(Http2FrameType.CONTINUATION)] - public async Task AbortedStream_ResetsAndDrainsRequest(Http2FrameType finalFrameType) + [InlineData((int)(Http2FrameType.DATA))] + [InlineData((int)(Http2FrameType.WINDOW_UPDATE))] + [InlineData((int)(Http2FrameType.HEADERS))] + [InlineData((int)(Http2FrameType.CONTINUATION))] + public async Task AbortedStream_ResetsAndDrainsRequest(int intFinalFrameType) { + var finalFrameType = (Http2FrameType)intFinalFrameType; + var headers = new[] { new KeyValuePair(HeaderNames.Method, "POST"), @@ -3947,11 +3954,13 @@ public async Task AbortedStream_ResetsAndDrainsRequest(Http2FrameType finalFrame } [Theory] - [InlineData(Http2FrameType.DATA)] - [InlineData(Http2FrameType.HEADERS)] - [InlineData(Http2FrameType.CONTINUATION)] - public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterEndOfStream(Http2FrameType finalFrameType) + [InlineData((int)(Http2FrameType.DATA))] + [InlineData((int)(Http2FrameType.HEADERS))] + [InlineData((int)(Http2FrameType.CONTINUATION))] + public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterEndOfStream(int intFinalFrameType) { + var finalFrameType = (Http2FrameType)intFinalFrameType; + var headers = new[] { new KeyValuePair(HeaderNames.Method, "POST"), @@ -4020,10 +4029,12 @@ await WaitForConnectionErrorAsync( } [Theory] - [InlineData(Http2FrameType.DATA)] - [InlineData(Http2FrameType.HEADERS)] - public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterClientReset(Http2FrameType finalFrameType) + [InlineData((int)(Http2FrameType.DATA))] + [InlineData((int)(Http2FrameType.HEADERS))] + public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterClientReset(int intFinalFrameType) { + var finalFrameType = (Http2FrameType)intFinalFrameType; + var headers = new[] { new KeyValuePair(HeaderNames.Method, "POST"), diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs index b11891638e1e..f1a3b215a097 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs @@ -117,16 +117,16 @@ protected static IEnumerable> ReadRateRequestHeader private readonly MemoryPool _memoryPool = KestrelMemoryPool.Create(); - protected readonly Http2PeerSettings _clientSettings = new Http2PeerSettings(); - protected readonly HPackEncoder _hpackEncoder = new HPackEncoder(); - protected readonly HPackDecoder _hpackDecoder; + internal readonly Http2PeerSettings _clientSettings = new Http2PeerSettings(); + internal readonly HPackEncoder _hpackEncoder = new HPackEncoder(); + internal readonly HPackDecoder _hpackDecoder; private readonly byte[] _headerEncodingBuffer = new byte[Http2PeerSettings.MinAllowedMaxFrameSize]; - protected readonly TimeoutControl _timeoutControl; - protected readonly Mock _mockKestrelTrace = new Mock(); + internal readonly TimeoutControl _timeoutControl; + internal readonly Mock _mockKestrelTrace = new Mock(); protected readonly Mock _mockConnectionContext = new Mock(); - protected readonly Mock _mockTimeoutHandler = new Mock(); - protected readonly Mock _mockTimeoutControl; + internal readonly Mock _mockTimeoutHandler = new Mock(); + internal readonly Mock _mockTimeoutControl; protected readonly ConcurrentDictionary> _runningStreams = new ConcurrentDictionary>(); protected readonly Dictionary _receivedHeaders = new Dictionary(StringComparer.OrdinalIgnoreCase); @@ -152,11 +152,11 @@ protected static IEnumerable> ReadRateRequestHeader protected readonly RequestDelegate _echoPath; protected readonly RequestDelegate _appAbort; - protected TestServiceContext _serviceContext; + internal TestServiceContext _serviceContext; private Timer _timer; internal DuplexPipe.DuplexPipePair _pair; - protected Http2Connection _connection; + internal Http2Connection _connection; protected Task _connectionTask; protected long _bytesReceived; @@ -722,7 +722,7 @@ protected async Task SendSettingsWithInvalidLengthAsync(int length) await SendAsync(payload); } - protected async Task SendSettingsWithInvalidParameterValueAsync(Http2SettingsParameter parameter, uint value) + internal async Task SendSettingsWithInvalidParameterValueAsync(Http2SettingsParameter parameter, uint value) { var writableBuffer = _pair.Application.Output; var frame = new Http2Frame(); @@ -752,7 +752,7 @@ protected Task SendPushPromiseFrameAsync() return FlushAsync(writableBuffer); } - protected async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable> headers) + internal async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable> headers) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -768,7 +768,7 @@ protected async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags return done; } - protected async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, byte[] headerBlock) + internal async Task SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, byte[] headerBlock) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -817,7 +817,7 @@ protected async Task SendIncompleteHeadersFrameAsync(int streamId) await SendAsync(payload); } - protected async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags) + internal async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -833,7 +833,7 @@ protected async Task SendContinuationAsync(int streamId, Http2Continuation return done; } - protected async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, byte[] payload) + internal async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, byte[] payload) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -845,7 +845,7 @@ protected async Task SendContinuationAsync(int streamId, Http2ContinuationFrameF await SendAsync(payload); } - protected async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable> headers) + internal async Task SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable> headers) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -861,7 +861,7 @@ protected async Task SendContinuationAsync(int streamId, Http2Continuation return done; } - protected Task SendEmptyContinuationFrameAsync(int streamId, Http2ContinuationFrameFlags flags) + internal Task SendEmptyContinuationFrameAsync(int streamId, Http2ContinuationFrameFlags flags) { var outputWriter = _pair.Application.Output; var frame = new Http2Frame(); @@ -944,7 +944,7 @@ protected Task SendInvalidDataFrameAsync(int streamId, int frameLength, byte pad return SendAsync(payload); } - protected Task SendPingAsync(Http2PingFrameFlags flags) + internal Task SendPingAsync(Http2PingFrameFlags flags) { var outputWriter = _pair.Application.Output; var pingFrame = new Http2Frame(); @@ -1086,7 +1086,7 @@ protected Task SendUnknownFrameTypeAsync(int streamId, int frameType) return FlushAsync(outputWriter); } - protected async Task ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) + internal async Task ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) { var frame = new Http2FrameWithPayload(); @@ -1125,7 +1125,7 @@ protected async Task ReceiveFrameAsync(uint maxFrameSize } } - protected async Task ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId) + internal async Task ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId) { var frame = await ReceiveFrameAsync((uint)withLength); @@ -1149,7 +1149,7 @@ protected Task WaitForConnectionStopAsync(int expectedLastStreamId, bool ignoreN return WaitForConnectionErrorAsync(ignoreNonGoAwayFrames, expectedLastStreamId, Http2ErrorCode.NO_ERROR, expectedErrorMessage: null); } - protected void VerifyGoAway(Http2Frame frame, int expectedLastStreamId, Http2ErrorCode expectedErrorCode) + internal void VerifyGoAway(Http2Frame frame, int expectedLastStreamId, Http2ErrorCode expectedErrorCode) { Assert.Equal(Http2FrameType.GOAWAY, frame.Type); Assert.Equal(8, frame.PayloadLength); @@ -1159,7 +1159,7 @@ protected void VerifyGoAway(Http2Frame frame, int expectedLastStreamId, Http2Err Assert.Equal(expectedErrorCode, frame.GoAwayErrorCode); } - protected async Task WaitForConnectionErrorAsync(bool ignoreNonGoAwayFrames, int expectedLastStreamId, Http2ErrorCode expectedErrorCode, params string[] expectedErrorMessage) + internal async Task WaitForConnectionErrorAsync(bool ignoreNonGoAwayFrames, int expectedLastStreamId, Http2ErrorCode expectedErrorCode, params string[] expectedErrorMessage) where TException : Exception { var frame = await ReceiveFrameAsync(); @@ -1185,7 +1185,7 @@ protected async Task WaitForConnectionErrorAsync(bool ignoreNonGoAwa _pair.Application.Output.Complete(); } - protected async Task WaitForStreamErrorAsync(int expectedStreamId, Http2ErrorCode expectedErrorCode, string expectedErrorMessage) + internal async Task WaitForStreamErrorAsync(int expectedStreamId, Http2ErrorCode expectedErrorCode, string expectedErrorMessage) { var frame = await ReceiveFrameAsync(); @@ -1225,7 +1225,7 @@ protected void AdvanceClock(TimeSpan timeSpan) _timeoutControl.Tick(clock.UtcNow); } - public class Http2FrameWithPayload : Http2Frame + internal class Http2FrameWithPayload : Http2Frame { public Http2FrameWithPayload() : base() { @@ -1237,7 +1237,7 @@ public Http2FrameWithPayload() : base() public ReadOnlySequence PayloadSequence => new ReadOnlySequence(Payload); } - public class MockTimeoutControlBase : ITimeoutControl + internal class MockTimeoutControlBase : ITimeoutControl { private readonly ITimeoutControl _realTimeoutControl; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs index 85745b9b14ba..96589ab25583 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TimeoutTests.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Server.Kestrel.Core.Features; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Testing; @@ -194,10 +193,11 @@ public async Task ResponseDrain_SlowerThanMinimumDataRate_AbortsConnection() } [Theory(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1879")] - [InlineData(Http2FrameType.DATA)] - [InlineData(Http2FrameType.CONTINUATION)] - public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterCooldownExpires(Http2FrameType finalFrameType) + [InlineData((int)Http2FrameType.DATA)] + [InlineData((int)Http2FrameType.CONTINUATION)] + public async Task AbortedStream_ResetsAndDrainsRequest_RefusesFramesAfterCooldownExpires(int intFinalFrameType) { + var finalFrameType = (Http2FrameType)intFinalFrameType; // Remove callback that completes _pair.Application.Output on abort. _mockConnectionContext.Reset(); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs index 4a5cf48e154b..2326d0cc768b 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; +using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure; using Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport; using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing.xunit; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionAdapterTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionAdapterTests.cs index 747c9c3626f7..bc62be972c86 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionAdapterTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionAdapterTests.cs @@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Kestrel.Core; -using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.Https.Internal; +using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport; using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.Testing.xunit; diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs index 7cb6c7571b93..88b33bf6cca0 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs @@ -1,8 +1,10 @@ // 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 System.Runtime.CompilerServices; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; [assembly: ShortClassName] [assembly: LogLevel(LogLevel.Trace)] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/RequestTargetProcessingTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/RequestTargetProcessingTests.cs index 62e1e6d381f3..e086a527e42e 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/RequestTargetProcessingTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/RequestTargetProcessingTests.cs @@ -93,10 +93,11 @@ await connection.Receive( } [Theory] - [InlineData(HttpMethod.Options, "*")] - [InlineData(HttpMethod.Connect, "host")] - public async Task NonPathRequestTargetSetInRawTarget(HttpMethod method, string requestTarget) + [InlineData((int)HttpMethod.Options, "*")] + [InlineData((int)HttpMethod.Connect, "host")] + public async Task NonPathRequestTargetSetInRawTarget(int intMethod, string requestTarget) { + var method = (HttpMethod)intMethod; var testContext = new TestServiceContext(LoggerFactory); using (var server = new TestServer(async context => diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryConnection.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryConnection.cs index 567f78a1f989..f698a4908d02 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryConnection.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryConnection.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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.Connections; @@ -7,9 +7,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport { - public class InMemoryConnection : StreamBackedTestConnection + internal class InMemoryConnection : StreamBackedTestConnection { - public InMemoryConnection(InMemoryTransportConnection transportConnection) : base(new RawStream(transportConnection.Output, transportConnection.Input)) { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryHttpClientSlim.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryHttpClientSlim.cs index 557cedd4bff8..efb66ca33b15 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryHttpClientSlim.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryHttpClientSlim.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTrans /// /// Lightweight version of HttpClient implemented on top of an arbitrary Stream. /// - public class InMemoryHttpClientSlim + internal class InMemoryHttpClientSlim { private readonly TestServer _inMemoryTestServer; @@ -134,4 +134,4 @@ await sslStream.AuthenticateAsClientAsync(requestUri.Host, clientCertificates: n } } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportConnection.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportConnection.cs index 50db85725d19..95c1907c0a72 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportConnection.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportConnection.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport { - public class InMemoryTransportConnection : TransportConnection, IDisposable + internal class InMemoryTransportConnection : TransportConnection, IDisposable { private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource(); diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportFactory.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportFactory.cs index e099222bc2e7..eeb271a70602 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportFactory.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/InMemoryTransportFactory.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTransport { - public class InMemoryTransportFactory : ITransportFactory + internal class InMemoryTransportFactory : ITransportFactory { public ITransport Create(IEndPointInformation endPointInformation, IConnectionDispatcher dispatcher) { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/TestServer.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/TestServer.cs index 0181f72daf46..b71f2ba490c8 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/TestServer.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/TestTransport/TestServer.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.TestTrans /// /// In-memory TestServer /// _memoryPool; private readonly RequestDelegate _app; diff --git a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj index 195464e98f7c..e0bd7e6ee842 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj +++ b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 diff --git a/src/Servers/Kestrel/tools/CodeGenerator/FeatureCollectionGenerator.cs b/src/Servers/Kestrel/tools/CodeGenerator/FeatureCollectionGenerator.cs index 5fd7f978b6f2..a702ae2cad48 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/FeatureCollectionGenerator.cs +++ b/src/Servers/Kestrel/tools/CodeGenerator/FeatureCollectionGenerator.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System; @@ -29,7 +29,7 @@ public static string GenerateFile(string namespaceName, string className, string namespace {namespaceName} {{ - public partial class {className} : IFeatureCollection + {(className == "TransportConnection" ? $@"public" : "internal")} partial class {className} : IFeatureCollection {{{Each(features, feature => $@" private static readonly Type {feature.Name}Type = typeof({feature.Name});")} {Each(features, feature => $@" diff --git a/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs b/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs index 7263d1fd1682..f3fb60551779 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs +++ b/src/Servers/Kestrel/tools/CodeGenerator/HttpUtilities/HttpUtilities.cs @@ -69,7 +69,7 @@ private static string GenerateFile(Tuple[] httpMethods) namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure {{ - public static partial class HttpUtilities + internal static partial class HttpUtilities {{ // readonly primitive statics can be Jit'd to consts https://github.com/dotnet/coreclr/issues/1079 {0} @@ -317,4 +317,4 @@ private unsafe static ulong GetAsciiStringAsLong(string str) } } } -} \ No newline at end of file +} diff --git a/src/Servers/Kestrel/tools/CodeGenerator/KnownHeaders.cs b/src/Servers/Kestrel/tools/CodeGenerator/KnownHeaders.cs index f5a9196bf78b..7530800e836b 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/KnownHeaders.cs +++ b/src/Servers/Kestrel/tools/CodeGenerator/KnownHeaders.cs @@ -337,7 +337,7 @@ public static string GeneratedFile() namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http {{ {Each(loops, loop => $@" - public partial class {loop.ClassName} + internal partial class {loop.ClassName} {{{(loop.Bytes != null ? $@" private static ReadOnlySpan HeaderBytes => new byte[]