File: _generated\33\Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter.cs
Web Access
Project: src\src\symreader\src\Microsoft.DiaSymReader\Microsoft.DiaSymReader.csproj (Microsoft.DiaSymReader)
// <auto-generated />
#pragma warning disable CS0612, CS0618, CS0649, CS1591

[global::System.Runtime.InteropServices.StructLayoutAttribute(global::System.Runtime.InteropServices.LayoutKind.Sequential)]
file unsafe struct InterfaceImplementationVtable
{
    public delegate* unmanaged[MemberFunction]<void*, global::System.Guid*, void**, int> QueryInterface_0;
    public delegate* unmanaged[MemberFunction]<void*, uint> AddRef_1;
    public delegate* unmanaged[MemberFunction]<void*, uint> Release_2;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int> DefineKickoffMethod_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int> DefineCatchHandlerILOffset_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, int*, int*, int> DefineAsyncStepInfo_5;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([116, 55, 7, 252, 57, 23, 50, 66, 189, 86, 160, 39, 41, 75, 236, 21]);
    public static void** ManagedVirtualMethodTable => (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
}

[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        global::System.Runtime.InteropServices.ComWrappers.GetIUnknownImpl(
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->QueryInterface_0,
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->AddRef_1,
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->Release_2);

        Vtable.DefineKickoffMethod_3 = &ABI_DefineKickoffMethod;
        Vtable.DefineCatchHandlerILOffset_4 = &ABI_DefineCatchHandlerILOffset;
        Vtable.DefineAsyncStepInfo_5 = &ABI_DefineAsyncStepInfo;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter.DefineKickoffMethod(int kickoffMethod)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int> )__vtable[3]);
        {
            int __invokeRetVal;
            {
                __invokeRetVal = __target(__this, kickoffMethod);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([116, 55, 7, 252, 57, 23, 50, 66, 189, 86, 160, 39, 41, 75, 236, 21]), (global::System.IntPtr)__this);
            global::System.GC.KeepAlive(this);
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_DefineKickoffMethod(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int kickoffMethod)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter>(__this_native);
            @this.DefineKickoffMethod(kickoffMethod);
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            __retVal = 0; // S_OK
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter.DefineCatchHandlerILOffset(int catchHandlerOffset)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int> )__vtable[4]);
        {
            int __invokeRetVal;
            {
                __invokeRetVal = __target(__this, catchHandlerOffset);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([116, 55, 7, 252, 57, 23, 50, 66, 189, 86, 160, 39, 41, 75, 236, 21]), (global::System.IntPtr)__this);
            global::System.GC.KeepAlive(this);
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_DefineCatchHandlerILOffset(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int catchHandlerOffset)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter>(__this_native);
            @this.DefineCatchHandlerILOffset(catchHandlerOffset);
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            __retVal = 0; // S_OK
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter.DefineAsyncStepInfo(int count, int[] yieldOffsets, int[] breakpointOffset, int[] breakpointMethod)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, int*, int*, int> )__vtable[5]);
        {
            int __invokeRetVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __breakpointMethod_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(breakpointMethod))
            fixed (void* __breakpointOffset_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(breakpointOffset))
            fixed (void* __yieldOffsets_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(yieldOffsets))
            {
                __invokeRetVal = __target(__this, count, (int*)__yieldOffsets_native, (int*)__breakpointOffset_native, (int*)__breakpointMethod_native);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([116, 55, 7, 252, 57, 23, 50, 66, 189, 86, 160, 39, 41, 75, 236, 21]), (global::System.IntPtr)__this);
            global::System.GC.KeepAlive(this);
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_DefineAsyncStepInfo(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int count, int* __yieldOffsets_native, int* __breakpointOffset_native, int* __breakpointMethod_native)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter @this = default;
        int[] yieldOffsets = default;
        int[] breakpointOffset = default;
        int[] breakpointMethod = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __breakpointMethod_native__numElements;
        __breakpointMethod_native__numElements = default;
        int __breakpointOffset_native__numElements;
        __breakpointOffset_native__numElements = default;
        int __yieldOffsets_native__numElements;
        __yieldOffsets_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __breakpointMethod_native__numElements = count;
            breakpointMethod = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.AllocateContainerForManagedElements(__breakpointMethod_native, __breakpointMethod_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetUnmanagedValuesSource(__breakpointMethod_native, __breakpointMethod_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetManagedValuesDestination(breakpointMethod));
            __breakpointOffset_native__numElements = count;
            breakpointOffset = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.AllocateContainerForManagedElements(__breakpointOffset_native, __breakpointOffset_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetUnmanagedValuesSource(__breakpointOffset_native, __breakpointOffset_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetManagedValuesDestination(breakpointOffset));
            __yieldOffsets_native__numElements = count;
            yieldOffsets = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.AllocateContainerForManagedElements(__yieldOffsets_native, __yieldOffsets_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetUnmanagedValuesSource(__yieldOffsets_native, __yieldOffsets_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.GetManagedValuesDestination(yieldOffsets));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedAsyncMethodPropertiesWriter>(__this_native);
            @this.DefineAsyncStepInfo(count, yieldOffsets, breakpointOffset, breakpointMethod);
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            __retVal = 0; // S_OK
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }
}

namespace Microsoft.DiaSymReader
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    internal unsafe partial interface ISymUnmanagedAsyncMethodPropertiesWriter
    {
    }
}