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)));
        }
Example #2
0
        public void register(string uid, Func <WirehomeDictionary, WirehomeDictionary> function)
        {
            if (uid == null)
            {
                throw new ArgumentNullException(nameof(uid));
            }
            if (function == null)
            {
                throw new ArgumentNullException(nameof(function));
            }

            _functionPoolService.RegisterFunction(uid, function);
        }