blob: 36320ac31752a16d4a2a8e8ed9b54a47ddb3990c (
plain) (
tree)
|
|
using System;
using System.Runtime.InteropServices;
namespace ARMeilleure.Translation
{
class DelegateInfo
{
private readonly Delegate _dlg; // Ensure that this delegate will not be garbage collected.
public IntPtr FuncPtr { get; }
public DelegateInfo(Delegate dlg)
{
_dlg = dlg;
FuncPtr = Marshal.GetFunctionPointerForDelegate<Delegate>(dlg);
}
}
}
|