static bool Unknown_SampleFunc() { try { var u = new Unknown() { ExternCalcFunction = (lst => { return(lst[0] * lst[0]); }) }; u.Params.Add(10); var res = u.CalcSquare(); if (Math.Abs(res - 100) < SquareMeter.VSMALL) { return(true); } return(false); } catch { return(false); } }
static bool Unknown_NoFunc_Exc() { try { var u = new Unknown(); u.CalcSquare(); return(false); } catch { return(true); } }
static bool Unknown_SampleFunc_Error() { try { var u = new Unknown() { ExternCalcFunction = (lst => { return(lst[0] * lst[0]); }) }; u.CalcSquare(); return(false); } catch { return(true); } }