File: _generated\0\LibraryImports.g.cs
Web Access
Project: src\src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\Microsoft.DotNet.NativeWrapper.csproj (Microsoft.DotNet.NativeWrapper)
// <auto-generated/>
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_get_dotnet_environment_info(string dotnetRoot, nint reserved, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_get_dotnet_environment_info_result_fn result, nint resultContext)
        {
            nint __dotnetRoot_native = default;
            nint __result_native = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __result_native = result != null ? global::System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(result) : default;
                __dotnetRoot_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(dotnetRoot);
                {
                    __retVal = __PInvoke(__dotnetRoot_native, reserved, __result_native, resultContext);
                }
 
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(result);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__dotnetRoot_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_get_dotnet_environment_info", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __dotnetRoot_native, nint __reserved_native, nint __result_native, nint __resultContext_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_set_error_writer", ExactSpelling = true)]
        internal static unsafe extern partial delegate* unmanaged[Cdecl]<global::Microsoft.DotNet.NativeWrapper.PlatformString, void> hostfxr_set_error_writer(delegate* unmanaged[Cdecl]<global::Microsoft.DotNet.NativeWrapper.PlatformString, void> error_writer);
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_resolve_sdk2(string exeDir, string workingDir, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_resolve_sdk2_flags_t flags, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_resolve_sdk2_result_fn result)
        {
            nint __exeDir_native = default;
            nint __workingDir_native = default;
            nint __result_native = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __result_native = result != null ? global::System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(result) : default;
                __workingDir_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(workingDir);
                __exeDir_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(exeDir);
                {
                    __retVal = __PInvoke(__exeDir_native, __workingDir_native, flags, __result_native);
                }
 
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(result);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__workingDir_native);
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__exeDir_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_resolve_sdk2", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __exeDir_native, nint __workingDir_native, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_resolve_sdk2_flags_t __flags_native, nint __result_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        private static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_get_available_sdks_private(string exeDir, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_get_available_sdks_result_fn result)
        {
            nint __exeDir_native = default;
            nint __result_native = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __result_native = result != null ? global::System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(result) : default;
                __exeDir_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(exeDir);
                {
                    __retVal = __PInvoke(__exeDir_native, __result_native);
                }
 
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(result);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__exeDir_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_get_available_sdks", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __exeDir_native, nint __result_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_initialize_for_runtime_config(nint runtimeConfigPath, in global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters parameters, out nint hostContextHandle)
        {
            hostContextHandle = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __hostContextHandle_native = &hostContextHandle)
            fixed (global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters* __parameters_native = &parameters)
            {
                __retVal = __PInvoke(runtimeConfigPath, __parameters_native, __hostContextHandle_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_initialize_for_runtime_config", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __runtimeConfigPath_native, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters* __parameters_native, nint* __hostContextHandle_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_get_runtime_delegate(nint hostContextHandle, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_delegate_type type, out nint @delegate)
        {
            @delegate = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __delegate_native = &@delegate)
            {
                __retVal = __PInvoke(hostContextHandle, type, __delegate_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_get_runtime_delegate", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __hostContextHandle_native, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_delegate_type __type_native, nint* __delegate_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_initialize_for_dotnet_command_line(int argc, string[] argv, in global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters parameters, out nint hostContextHandle)
        {
            bool __invokeSucceeded = default;
            hostContextHandle = default;
            nint* __argv_native = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<string, nint>.ManagedToUnmanagedIn __argv_native__marshaller = new();
            int __argv_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __argv_native__numElements);
            int __argv_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __argv_native__marshaller.FromManaged(argv, stackalloc nint[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<string, nint>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<string> __argv_native__managedSpan = __argv_native__marshaller.GetManagedValuesSource();
                    global::System.Span<nint> __argv_native__nativeSpan = __argv_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __argv_native__managedSpan.Length; ++__i0, ++__argv_native__lastIndexMarshalled)
                    {
                        __argv_native__nativeSpan[__i0] = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(__argv_native__managedSpan[__i0]);
                    }
                }
 
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (nint* __hostContextHandle_native = &hostContextHandle)
                fixed (global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters* __parameters_native = &parameters)
                fixed (void* __argv_native__unused = __argv_native__marshaller)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __argv_native = __argv_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(argc, __argv_native, __parameters_native, __hostContextHandle_native);
                }
 
                __invokeSucceeded = true;
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __argv_native__lastIndexMarshalled;
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<nint> __argv_native__nativeSpan = __argv_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __argv_native__lastIndexMarshalled; ++__i0)
                    {
                        global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__argv_native__nativeSpan[__i0]);
                    }
                }
 
                __argv_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_initialize_for_dotnet_command_line", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(int __argc_native, nint* __argv_native, global::Microsoft.DotNet.NativeWrapper.Interop.hostfxr_initialize_parameters* __parameters_native, nint* __hostContextHandle_native);
        }
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_run_app", ExactSpelling = true)]
        internal static extern partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_run_app(nint hostContextHandle);
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_close", ExactSpelling = true)]
        internal static extern partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_close(nint hostContextHandle);
    }
}
namespace Microsoft.DotNet.NativeWrapper
{
    public static unsafe partial class Interop
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        internal static partial global::Microsoft.DotNet.NativeWrapper.StatusCode hostfxr_set_runtime_property_value(nint hostContextHandle, string name, string value)
        {
            nint __name_native = default;
            nint __value_native = default;
            global::Microsoft.DotNet.NativeWrapper.StatusCode __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __value_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(value);
                __name_native = global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.ConvertToUnmanaged(name);
                {
                    __retVal = __PInvoke(hostContextHandle, __name_native, __value_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__value_native);
                global::Microsoft.DotNet.NativeWrapper.PlatformStringMarshaller.Free(__name_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("hostfxr", EntryPoint = "hostfxr_set_runtime_property_value", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe global::Microsoft.DotNet.NativeWrapper.StatusCode __PInvoke(nint __hostContextHandle_native, nint __name_native, nint __value_native);
        }
    }
}