Class OdfFormulaFunctionRegistry
Stores application-defined formula functions for one evaluator instance. 儲存單一評估器執行個體使用的應用程式自訂公式函式。
public sealed class OdfFormulaFunctionRegistry
- Inheritance
-
OdfFormulaFunctionRegistry
- Inherited Members
Remarks
The registry never overrides built-in functions. Instance scope prevents one tenant or document pipeline from mutating another pipeline's formula behavior. 此註冊表不會覆寫內建函式;執行個體範圍可避免租戶或文件管線變更其它管線的公式行為。
Constructors
OdfFormulaFunctionRegistry()
public OdfFormulaFunctionRegistry()
Properties
Names
Gets a snapshot of registered function names. 取得已註冊函式名稱的快照。
public IReadOnlyList<string> Names { get; }
Property Value
Methods
AddOrUpdate(string, OdfFormulaFunctionHandler)
Registers a function or replaces the existing application-defined handler. 註冊函式,或取代既有的應用程式自訂處理常式。
public void AddOrUpdate(string name, OdfFormulaFunctionHandler handler)
Parameters
namestringThe OpenFormula-compatible function name. / 與 OpenFormula 相容的函式名稱。
handlerOdfFormulaFunctionHandlerThe function handler. / 函式處理常式。
Contains(string)
Determines whether an application-defined function is registered. 判斷是否已註冊應用程式自訂函式。
public bool Contains(string name)
Parameters
namestringThe function name. / 函式名稱。
Returns
Register(string, OdfFormulaFunctionHandler)
Registers a new function and rejects duplicate names. 註冊新函式,並拒絕重複名稱。
public void Register(string name, OdfFormulaFunctionHandler handler)
Parameters
namestringThe OpenFormula-compatible function name. / 與 OpenFormula 相容的函式名稱。
handlerOdfFormulaFunctionHandlerThe function handler. / 函式處理常式。
Remove(string)
Removes an application-defined function. 移除應用程式自訂函式。
public bool Remove(string name)
Parameters
namestringThe function name. / 函式名稱。