예제 #1
0
 /// <summary>
 /// Loads a module containing custom functions to the formula parser. By using
 /// this method you can add your own implementations of Excel functions, by
 /// implementing a <see cref="IFunctionModule"/>.
 /// </summary>
 /// <param name="module">A <see cref="IFunctionModule"/> containing <see cref="ExcelFunction"/>s.</param>
 public void LoadFunctionModule(IFunctionModule module)
 {
     _parser.Configure(x => x.FunctionRepository.LoadModule(module));
 }
예제 #2
0
 /// <summary>
 /// If the supplied <paramref name="functionName"/> does not exist, the supplied
 /// <paramref name="functionImpl"/> implementation will be added to the formula parser.
 /// If it exists, the existing function will be replaced by the supplied <paramref name="functionImpl">function implementation</paramref>
 /// </summary>
 /// <param name="functionName"></param>
 /// <param name="functionImpl"></param>
 public void AddOrReplaceFunction(string functionName, ExcelFunction functionImpl)
 {
     _parser.Configure(x => x.FunctionRepository.AddOrReplaceFunction(functionName, functionImpl));
 }