目錄 / Table of Contents

Class OdfFormulaFunctionRegistry

Namespace
OdfKit.Formula
Assembly
OdfKit.dll

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

IReadOnlyList<string>

Methods

AddOrUpdate(string, OdfFormulaFunctionHandler)

Registers a function or replaces the existing application-defined handler. 註冊函式,或取代既有的應用程式自訂處理常式。

public void AddOrUpdate(string name, OdfFormulaFunctionHandler handler)

Parameters

name string

The OpenFormula-compatible function name. / 與 OpenFormula 相容的函式名稱。

handler OdfFormulaFunctionHandler

The function handler. / 函式處理常式。

Contains(string)

Determines whether an application-defined function is registered. 判斷是否已註冊應用程式自訂函式。

public bool Contains(string name)

Parameters

name string

The function name. / 函式名稱。

Returns

bool

true when the function is registered. / 若已註冊函式則為 true

Register(string, OdfFormulaFunctionHandler)

Registers a new function and rejects duplicate names. 註冊新函式,並拒絕重複名稱。

public void Register(string name, OdfFormulaFunctionHandler handler)

Parameters

name string

The OpenFormula-compatible function name. / 與 OpenFormula 相容的函式名稱。

handler OdfFormulaFunctionHandler

The function handler. / 函式處理常式。

Remove(string)

Removes an application-defined function. 移除應用程式自訂函式。

public bool Remove(string name)

Parameters

name string

The function name. / 函式名稱。

Returns

bool

true when a function was removed. / 若已移除函式則為 true