public void register(string uid, PythonDelegates.CallbackWithResultDelegate function) { if (uid == null) { throw new ArgumentNullException(nameof(uid)); } if (function == null) { throw new ArgumentNullException(nameof(function)); } _functionPoolService.RegisterFunction(uid, p => function(PythonConvert.ToWirehomeDictionary(p))); }