File: LibraryImports.g.cs
Project: src\src\Servers\IIS\IIS\src\Microsoft.AspNetCore.Server.IIS.csproj (Microsoft.AspNetCore.Server.IIS)
// <auto-generated/>
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        public static partial bool CloseHandle(nint handle)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke(handle);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CloseHandle", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial nint GetModuleHandle(string lpModuleName)
        {
            nint __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpModuleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpModuleName))
            {
                __retVal = __PInvoke((ushort*)__lpModuleName_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetModuleHandleW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __lpModuleName_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_post_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, int cbBytes)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, cbBytes);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_post_completion", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, int __cbBytes_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_set_completion_status(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS rquestNotificationStatus)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, rquestNotificationStatus);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_set_completion_status", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS __rquestNotificationStatus_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial void http_indicate_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS notificationStatus)
        {
            nint __pInProcessHandler_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __PInvoke(__pInProcessHandler_native, notificationStatus);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_indicate_completion", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __pInProcessHandler_native, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS __notificationStatus_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int register_callbacks(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication, delegate* unmanaged<nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> requestCallback, delegate* unmanaged<nint, int> shutdownCallback, delegate* unmanaged<nint, void> disconnectCallback, delegate* unmanaged<nint, int, int, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> asyncCallback, delegate* unmanaged<nint, void> requestsDrainedHandler, nint pvRequestContext, nint pvShutdownContext)
        {
            nint __pInProcessApplication_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessApplication_native__marshaller.FromManaged(pInProcessApplication);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessApplication_native = __pInProcessApplication_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessApplication_native, requestCallback, shutdownCallback, disconnectCallback, asyncCallback, requestsDrainedHandler, pvRequestContext, pvShutdownContext);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessApplication_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "register_callbacks", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessApplication_native, delegate* unmanaged<nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> __requestCallback_native, delegate* unmanaged<nint, int> __shutdownCallback_native, delegate* unmanaged<nint, void> __disconnectCallback_native, delegate* unmanaged<nint, int, int, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> __asyncCallback_native, delegate* unmanaged<nint, void> __requestsDrainedHandler_native, nint __pvRequestContext_native, nint __pvShutdownContext_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_write_response_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pDataChunks, int nChunks, out bool fCompletionExpected)
        {
            fCompletionExpected = default;
            nint __pInProcessHandler_native = default;
            int __fCompletionExpected_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pDataChunks, nChunks, &__fCompletionExpected_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                fCompletionExpected = __fCompletionExpected_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_write_response_bytes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* __pDataChunks_native, int __nChunks_native, int* __fCompletionExpected_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_flush_response_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, bool fMoreData, out bool fCompletionExpected)
        {
            fCompletionExpected = default;
            nint __pInProcessHandler_native = default;
            int __fMoreData_native = default;
            int __fCompletionExpected_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fMoreData_native = (int)(fMoreData ? 1 : 0);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, __fMoreData_native, &__fCompletionExpected_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                fCompletionExpected = __fCompletionExpected_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_flush_response_bytes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, int __fMoreData_native, int* __fCompletionExpected_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V2* http_get_raw_request(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V2* __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_get_raw_request", ExactSpelling = true)]
            static extern unsafe global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V2* __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_stop_calls_into_managed(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication)
        {
            nint __pInProcessApplication_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessApplication_native__marshaller.FromManaged(pInProcessApplication);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessApplication_native = __pInProcessApplication_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessApplication_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessApplication_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_stop_calls_into_managed", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessApplication_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_stop_incoming_requests(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication)
        {
            nint __pInProcessApplication_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessApplication_native__marshaller.FromManaged(pInProcessApplication);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessApplication_native = __pInProcessApplication_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessApplication_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessApplication_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_stop_incoming_requests", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessApplication_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_disable_buffering(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_disable_buffering", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_set_response_status_code(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ushort statusCode, string pszReason)
        {
            nint __pInProcessHandler_native = default;
            byte* __pszReason_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn __pszReason_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pszReason_native__marshaller.FromManaged(pszReason, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pszReason_native = __pszReason_native__marshaller.ToUnmanaged();
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, statusCode, __pszReason_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pszReason_native__marshaller.Free();
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_set_response_status_code", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, ushort __statusCode_native, byte* __pszReason_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_read_request_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, out bool fCompletionExpected)
        {
            dwBytesReceived = default;
            fCompletionExpected = default;
            nint __pInProcessHandler_native = default;
            int __fCompletionExpected_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __dwBytesReceived_native = &dwBytesReceived)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pvBuffer, cbBuffer, __dwBytesReceived_native, &__fCompletionExpected_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                fCompletionExpected = __fCompletionExpected_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_read_request_bytes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __pvBuffer_native, int __cbBuffer_native, int* __dwBytesReceived_native, int* __fCompletionExpected_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial void http_get_completion_info(nint pCompletionInfo, out int cbBytes, out int hr)
        {
            cbBytes = default;
            hr = default;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __hr_native = &hr)
            fixed (int* __cbBytes_native = &cbBytes)
            {
                __PInvoke(pCompletionInfo, __cbBytes_native, __hr_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_get_completion_info", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __pCompletionInfo_native, int* __cbBytes_native, int* __hr_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_set_managed_context(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, nint pvManagedContext)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pvManagedContext);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_set_managed_context", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, nint __pvManagedContext_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_get_application_properties(out global::Microsoft.AspNetCore.Server.IIS.Core.IISConfigurationData iiConfigData)
        {
            bool __invokeSucceeded = default;
            iiConfigData = default;
            global::Microsoft.AspNetCore.Server.IIS.Core.IISConfigurationData.Marshaller.Native __iiConfigData_native = default;
            int __retVal = default;
            try
            {
                {
                    __retVal = __PInvoke(&__iiConfigData_native);
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                iiConfigData = global::Microsoft.AspNetCore.Server.IIS.Core.IISConfigurationData.Marshaller.ConvertToManaged(__iiConfigData_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::Microsoft.AspNetCore.Server.IIS.Core.IISConfigurationData.Marshaller.Free(__iiConfigData_native);
                }
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_get_application_properties", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::Microsoft.AspNetCore.Server.IIS.Core.IISConfigurationData.Marshaller.Native* __iiConfigData_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_query_request_property", ExactSpelling = true)]
        private static unsafe extern partial int http_query_request_property(ulong requestId, global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_PROPERTY propertyId, void* qualifier, uint qualifierSize, void* output, uint outputSize, uint* bytesReturned, nint overlapped);
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_get_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, out string value)
        {
            bool __invokeSucceeded = default;
            value = default;
            nint __pInProcessHandler_native = default;
            byte* __variableName_native = default;
            ushort* __value_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn __variableName_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __variableName_native__marshaller.FromManaged(variableName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __variableName_native = __variableName_native__marshaller.ToUnmanaged();
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, __variableName_native, &__value_native);
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                value = global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToManaged(__value_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.Free(__value_native);
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __variableName_native__marshaller.Free();
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_get_server_variable", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __variableName_native, ushort** __value_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_set_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, string value)
        {
            nint __pInProcessHandler_native = default;
            byte* __variableName_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn __variableName_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __variableName_native__marshaller.FromManaged(variableName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.AnsiStringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __value_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(value))
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __variableName_native = __variableName_native__marshaller.ToUnmanaged();
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, __variableName_native, (ushort*)__value_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __variableName_native__marshaller.Free();
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_set_server_variable", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __variableName_native, ushort* __value_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_websockets_read_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, nint pvCompletionContext, out int dwBytesReceived, out bool fCompletionExpected)
        {
            dwBytesReceived = default;
            fCompletionExpected = default;
            nint __pInProcessHandler_native = default;
            int __fCompletionExpected_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __dwBytesReceived_native = &dwBytesReceived)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pvBuffer, cbBuffer, pfnCompletionCallback, pvCompletionContext, __dwBytesReceived_native, &__fCompletionExpected_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                fCompletionExpected = __fCompletionExpected_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_websockets_read_bytes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __pvBuffer_native, int __cbBuffer_native, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> __pfnCompletionCallback_native, nint __pvCompletionContext_native, int* __dwBytesReceived_native, int* __fCompletionExpected_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_websockets_write_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pDataChunks, int nChunks, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, nint pvCompletionContext, out bool fCompletionExpected)
        {
            fCompletionExpected = default;
            nint __pInProcessHandler_native = default;
            int __fCompletionExpected_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pDataChunks, nChunks, pfnCompletionCallback, pvCompletionContext, &__fCompletionExpected_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                fCompletionExpected = __fCompletionExpected_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_websockets_write_bytes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* __pDataChunks_native, int __nChunks_native, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> __pfnCompletionCallback_native, nint __pvCompletionContext_native, int* __fCompletionExpected_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_enable_websockets(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_enable_websockets", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_cancel_io(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_cancel_io", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_close_connection(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_close_connection", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_response_set_need_goaway(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_response_set_need_goaway", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_response_set_unknown_header(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool fReplace)
        {
            nint __pInProcessHandler_native = default;
            int __fReplace_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fReplace_native = (int)(fReplace ? 1 : 0);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pszHeaderName, pszHeaderValue, usHeaderValueLength, __fReplace_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_response_set_unknown_header", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __pszHeaderName_native, byte* __pszHeaderValue_native, ushort __usHeaderValueLength_native, int __fReplace_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_has_response4(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out bool isResponse4)
        {
            isResponse4 = default;
            nint __pInProcessHandler_native = default;
            int __isResponse4_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, &__isResponse4_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                isResponse4 = __isResponse4_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_has_response4", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, int* __isResponse4_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_response_set_trailer(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool replace)
        {
            nint __pInProcessHandler_native = default;
            int __replace_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __replace_native = (int)(replace ? 1 : 0);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, pszHeaderName, pszHeaderValue, usHeaderValueLength, __replace_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_response_set_trailer", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, byte* __pszHeaderName_native, byte* __pszHeaderValue_native, ushort __usHeaderValueLength_native, int __replace_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_reset_stream(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ulong errorCode)
        {
            nint __pInProcessHandler_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, errorCode);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_reset_stream", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, ulong __errorCode_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static unsafe partial int http_response_set_known_header(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, bool fReplace)
        {
            nint __pInProcessHandler_native = default;
            int __fReplace_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fReplace_native = (int)(fReplace ? 1 : 0);
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, headerId, pHeaderValue, length, __fReplace_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_response_set_known_header", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, int __headerId_native, byte* __pHeaderValue_native, ushort __length_native, int __fReplace_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "10.0.13.702")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial int http_get_authentication_information(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out string authType, out nint token)
        {
            bool __invokeSucceeded = default;
            authType = default;
            token = default;
            nint __pInProcessHandler_native = default;
            ushort* __authType_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pInProcessHandler_native__marshaller.FromManaged(pInProcessHandler);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (nint* __token_native = &token)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pInProcessHandler_native = __pInProcessHandler_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__pInProcessHandler_native, &__authType_native, __token_native);
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                authType = global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToManaged(__authType_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.Free(__authType_native);
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pInProcessHandler_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_get_authentication_information", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __pInProcessHandler_native, ushort** __authType_native, nint* __token_native);
        }
    }
}
namespace Microsoft.AspNetCore.Server.IIS
{
    internal static unsafe partial class NativeMethods
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("aspnetcorev2_inprocess.dll", EntryPoint = "http_set_startup_error_page_content", ExactSpelling = true)]
        private static unsafe extern partial int http_set_startup_error_page_content(byte* content, int contentLength);
    }
}