[]
Evaluates the specified custom name and returns its value.
object Evaluate(string text)
Function Evaluate(text As String) As Object
| Type | Name | Description |
|---|---|---|
| string | text | The custom name to evaluate. |
| Type | Description |
|---|---|
| object | The value resolved for the specified custom name. |
class CustomFormulaResolver : IFormulaResolver
{
public bool IsCustomName(string text)
{
return text == "TaxRate";
}
public object Evaluate(string text)
{
return text == "TaxRate" ? 0.08 : null;
}
}
IFormulaResolver resolver = new CustomFormulaResolver();
object value = resolver.Evaluate("TaxRate");