<PackageReference Include="Serilog" Version="4.3.2-dev-02433" />

System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute

Any method marked with UnmanagedCallersOnlyAttribute can be directly called from native code. The function token can be loaded to a local variable using the address-of operator in C# and passed as a callback to a native method.
namespace System.Runtime.InteropServices { internal sealed class UnmanagedCallersOnlyAttribute : Attribute { public Type[] CallConvs; public string EntryPoint; public UnmanagedCallersOnlyAttribute(); } }