26 private readonly Func<DateTime, decimal> _benchmark;
34 if (benchmark ==
null)
36 throw new ArgumentNullException(nameof(benchmark));
38 _benchmark = benchmark;
47 if (!pyFunc.TryConvertToDelegate(out _benchmark))
49 throw new ArgumentException($
"FuncBenchmark(): {Messages.FuncBenchmark.UnableToConvertPythonFunctionToBenchmarkFunction}");
60 return _benchmark(time);