/// <summary> /// Adds the <see cref="EvalFunc2{T}"/> delegate /// to the <see cref="FunctionCollection{T}"/> with the /// function name, taken from real method name.</summary> /// <param name="target"> /// <see cref="EvalFunc2{T}"/> instance to add.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="target"/> is null.</exception> /// <exception cref="ArgumentException"> /// <paramref name="target"/> is not valid delegate /// to be added to the <see cref="FunctionCollection{T}"/>. /// <br/>-or-<br/><see cref="FunctionInfo{T}"/> with the /// same name and same arguments count already exist /// in the collection (overload impossible).</exception> /// <remarks>Not available on .NET CF 2.0 because /// it's impossible to resolve method name.</remarks> public void Add(EvalFunc2 <T> target) { AddFunc(FunctionFactory <T> .FromKnownDelegate(target, 2, true)); }
/// <summary> /// Adds the <see cref="EvalFunc2{T}"/> delegate /// to the <see cref="FunctionCollection{T}"/> /// with the specified function name.</summary> /// <param name="name">Function group name.</param> /// <param name="target"> /// <see cref="EvalFunc2{T}"/> instance to add.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="name"/> is null.<br/>-or-<br/> /// <paramref name="target"/> is null.</exception> /// <exception cref="ArgumentException"> /// <paramref name="target"/> is not valid delegate /// to be added to the <see cref="FunctionCollection{T}"/>. /// <br/>-or-<br/><see cref="FunctionInfo{T}"/> with the /// same name and same arguments count already exist /// in the collection (overload impossible).</exception> public void Add(string name, EvalFunc2 <T> target) { AddFunc(name, FunctionFactory <T> .FromKnownDelegate(target, 2, true)); }