in managed/JetBrains.Timeline.Profiler.Api/Src/TimelineProfiler.cs [13:25]
public TimelineProfiler(string binDirectory, Action<bool, ulong, ulong> onProviderEnabled)
{
myBinDirectory = binDirectory;
myProfiler = new TimelineProfilerInterop(myBinDirectory);
myProviderEnableDelegate = new TimelineProfilerInterop.NativeDelegate((TimelineProfilerInterop.OnProviderEnabled)((isEnabled, matchAnyKeyword, matchAllKeyword) => {
onProviderEnabled(isEnabled != 0, matchAnyKeyword, matchAllKeyword);
}));
var errorMessage = IntPtr.Zero;
myProviderHandle = myProfiler.RegisterProvider(myProviderEnableDelegate.GetPointer(), ref errorMessage);
myProfiler.CheckError(errorMessage);
}