Class FunctionRepository
This class provides methods for accessing/modifying VBA Functions.
Inheritance
System.Object
    FunctionRepository
  Implements
Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: OfficeOpenXml.FormulaParsing.Excel.Functions
Assembly: EPPlus.dll
Syntax
public class FunctionRepository : IFunctionNameProviderProperties
CustomCompilers
Gets a System.Collections.Generic.Dictionary<TKey, TValue> of custom FunctionCompilers.
Declaration
public Dictionary<Type, FunctionCompiler> CustomCompilers { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.Dictionary<System.Type, FunctionCompiler> | 
FunctionNames
Returns the names of all implemented functions.
Declaration
public IEnumerable<string> FunctionNames { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<System.String> | 
Methods
AddOrReplaceFunction(String, ExcelFunction)
Adds or replaces a function.
Declaration
public void AddOrReplaceFunction(string functionName, ExcelFunction functionImpl)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | functionName | Case-insensitive name of the function that should be added or replaced. | 
| ExcelFunction | functionImpl | An implementation of an ExcelFunction. | 
Clear()
Removes all functions from the repository
Declaration
public virtual void Clear()Create()
Declaration
public static FunctionRepository Create()Returns
| Type | Description | 
|---|---|
| FunctionRepository | 
GetFunction(String)
Declaration
public virtual ExcelFunction GetFunction(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | 
Returns
| Type | Description | 
|---|---|
| ExcelFunction | 
IsFunctionName(String)
Returns true if the the supplied name exists in the repository.
Declaration
public bool IsFunctionName(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
LoadModule(IFunctionModule)
Loads a module of ExcelFunctions to the function repository.
Declaration
public virtual void LoadModule(IFunctionModule module)Parameters
| Type | Name | Description | 
|---|---|---|
| IFunctionModule | module | A IFunctionModule that can be used for adding functions and custom function compilers. |