Skip to content

Commit 7b29b45

Browse files
wtgodbedougbu
authored andcommitted
Fix Servers/Kestrel with manual types
1 parent d29247d commit 7b29b45

File tree

3 files changed

+97
-5
lines changed

3 files changed

+97
-5
lines changed

src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.Manual.cs

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,61 @@ public HttpsConnectionMiddleware(Microsoft.AspNetCore.Connections.ConnectionDele
302302
public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Connections.ConnectionContext context) { throw null; }
303303
}
304304
}
305-
305+
namespace Microsoft.AspNetCore.Server.Kestrel.Https
306+
{
307+
public static partial class CertificateLoader
308+
{
309+
internal static bool DoesCertificateHaveAnAccessiblePrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
310+
internal static bool IsCertificateAllowedForServerAuth(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
311+
}
312+
}
306313
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
307314
{
315+
internal static partial class MemoryPoolExtensions
316+
{
317+
public static int GetMinimumAllocSize(this System.Buffers.MemoryPool<byte> pool) { throw null; }
318+
public static int GetMinimumSegmentSize(this System.Buffers.MemoryPool<byte> pool) { throw null; }
319+
}
320+
internal partial class DuplexPipeStreamAdapter<TStream> : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.DuplexPipeStream, System.IO.Pipelines.IDuplexPipe where TStream : System.IO.Stream
321+
{
322+
public DuplexPipeStreamAdapter(System.IO.Pipelines.IDuplexPipe duplexPipe, System.Func<System.IO.Stream, TStream> createStream) : base (default(System.IO.Pipelines.PipeReader), default(System.IO.Pipelines.PipeWriter), default(bool)) { }
323+
public DuplexPipeStreamAdapter(System.IO.Pipelines.IDuplexPipe duplexPipe, System.IO.Pipelines.StreamPipeReaderOptions readerOptions, System.IO.Pipelines.StreamPipeWriterOptions writerOptions, System.Func<System.IO.Stream, TStream> createStream) : base (default(System.IO.Pipelines.PipeReader), default(System.IO.Pipelines.PipeWriter), default(bool)) { }
324+
public System.IO.Pipelines.PipeReader Input { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
325+
public System.IO.Pipelines.PipeWriter Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
326+
public TStream Stream { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
327+
protected override void Dispose(bool disposing) { }
328+
public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
329+
}
330+
internal partial class DuplexPipeStream : System.IO.Stream
331+
{
332+
public DuplexPipeStream(System.IO.Pipelines.PipeReader input, System.IO.Pipelines.PipeWriter output, bool throwOnCancelled = false) { }
333+
public override bool CanRead { get { throw null; } }
334+
public override bool CanSeek { get { throw null; } }
335+
public override bool CanWrite { get { throw null; } }
336+
public override long Length { get { throw null; } }
337+
public override long Position { get { throw null; } set { } }
338+
public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; }
339+
public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; }
340+
public void CancelPendingRead() { }
341+
public override int EndRead(System.IAsyncResult asyncResult) { throw null; }
342+
public override void EndWrite(System.IAsyncResult asyncResult) { }
343+
public override void Flush() { }
344+
public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
345+
public override int Read(byte[] buffer, int offset, int count) { throw null; }
346+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
347+
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
348+
public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; }
349+
public override void SetLength(long value) { }
350+
public override void Write(byte[] buffer, int offset, int count) { }
351+
public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
352+
public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
353+
}
354+
internal partial class ConnectionLimitMiddleware
355+
{
356+
internal ConnectionLimitMiddleware(Microsoft.AspNetCore.Connections.ConnectionDelegate next, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.ResourceCounter concurrentConnectionCounter, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace) { }
357+
public ConnectionLimitMiddleware(Microsoft.AspNetCore.Connections.ConnectionDelegate next, long connectionLimit, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.IKestrelTrace trace) { }
358+
public System.Threading.Tasks.Task OnConnectionAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection) { throw null; }
359+
}
308360
internal static partial class HttpConnectionBuilderExtensions
309361
{
310362
public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHttpServer<TContext>(this Microsoft.AspNetCore.Connections.IConnectionBuilder builder, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ServiceContext serviceContext, Microsoft.AspNetCore.Hosting.Server.IHttpApplication<TContext> application, Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols protocols) { throw null; }
@@ -1484,8 +1536,6 @@ internal static partial class IntegerEncoder
14841536
}
14851537
internal partial class IntegerDecoder
14861538
{
1487-
private int _i;
1488-
private int _m;
14891539
public IntegerDecoder() { }
14901540
public bool BeginTryDecode(byte b, int prefixLength, out int result) { throw null; }
14911541
public static void ThrowIntegerTooBigException() { }
@@ -1834,7 +1884,24 @@ internal enum TimeoutReason
18341884
TimeoutFeature = 6,
18351885
}
18361886
}
1837-
1887+
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
1888+
{
1889+
[System.Diagnostics.Tracing.EventSourceAttribute(Name="Microsoft-AspNetCore-Server-Kestrel")]
1890+
internal sealed partial class KestrelEventSource : System.Diagnostics.Tracing.EventSource
1891+
{
1892+
public static readonly Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelEventSource Log;
1893+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)][System.Diagnostics.Tracing.EventAttribute(5, Level=System.Diagnostics.Tracing.EventLevel.Verbose)]
1894+
public void ConnectionRejected(string connectionId) { }
1895+
[System.Diagnostics.Tracing.NonEventAttribute]
1896+
public void ConnectionStart(Microsoft.AspNetCore.Connections.ConnectionContext connection) { }
1897+
[System.Diagnostics.Tracing.NonEventAttribute]
1898+
public void ConnectionStop(Microsoft.AspNetCore.Connections.ConnectionContext connection) { }
1899+
[System.Diagnostics.Tracing.NonEventAttribute]
1900+
public void RequestStart(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol httpProtocol) { }
1901+
[System.Diagnostics.Tracing.NonEventAttribute]
1902+
public void RequestStop(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol httpProtocol) { }
1903+
}
1904+
}
18381905
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.PipeWriterHelpers
18391906
{
18401907
internal sealed partial class ConcurrentPipeWriter : System.IO.Pipelines.PipeWriter

src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Manual.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ public TransportConnection() { }
1818
internal void ResetFeatureCollection() { }
1919
}
2020
}
21+
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
22+
{
23+
public partial class LibuvTransportOptions
24+
{
25+
internal System.Func<System.Buffers.MemoryPool<byte>> MemoryPoolFactory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
26+
}
27+
}
2128
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
2229
{
2330
internal partial class LibuvConnectionListener : Microsoft.AspNetCore.Connections.IConnectionListener
@@ -431,7 +438,18 @@ public partial struct uv_buf_t
431438
{
432439
private readonly System.IntPtr _field0;
433440
private readonly System.IntPtr _field1;
434-
public uv_buf_t(System.IntPtr memory, int len, bool IsWindows) { throw null; }
441+
public uv_buf_t(System.IntPtr memory, int len, bool IsWindows) {
442+
if (IsWindows)
443+
{
444+
_field0 = (System.IntPtr)len;
445+
_field1 = memory;
446+
}
447+
else
448+
{
449+
_field0 = memory;
450+
_field1 = (System.IntPtr)len;
451+
}
452+
}
435453
}
436454
public delegate void uv_close_cb(System.IntPtr handle);
437455
public delegate void uv_connection_cb(System.IntPtr server, int status);

src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Manual.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,10 @@ internal static partial class SlabMemoryPoolFactory
8585
public static System.Buffers.MemoryPool<byte> CreateSlabMemoryPool() { throw null; }
8686
}
8787
}
88+
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
89+
{
90+
public partial class SocketTransportOptions
91+
{
92+
internal System.Func<System.Buffers.MemoryPool<byte>> MemoryPoolFactory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
93+
}
94+
}

0 commit comments

Comments
 (0)