HtmlForgeX

API Reference

Class

DataTablesLabelerRegistry

Namespace HtmlForgeX
Assembly HtmlForgeX

Registry for per-type and per-property labelers used by DataTables smart value formatters.

Inheritance

  • Object
  • DataTablesLabelerRegistry

Constructors

Methods

public Void RegisterAccessor<T>(String propertyName, Func<T, Object> accessor) #
Returns: Void

Type Parameters

T

Parameters

propertyName String requiredposition: 0
accessor Func<T, Object> requiredposition: 1
RegisterAccessor``1(System.String propertyName, System.Func{``0,System.Object} accessor) #

Registers a typed accessor for a property name on type T. Used by JoinProperty/SmartLabel to read values without reflection (AOT-safe).

Parameters

propertyName System.String required
accessor System.Func{``0,System.Object} required
public Void RegisterForProperty(String propertyName, Func<Object, String> labeler) #
Returns: Void

Register a labeler for a property/column name (case-insensitive). Useful for enumerable columns like "Inventory".

Parameters

propertyName System.String requiredposition: 0
labeler System.Func{System.Object,System.String} requiredposition: 1
public Void RegisterForType<T>(Func<T, String> labeler) #
Returns: Void

Type Parameters

T

Parameters

labeler Func<T, String> requiredposition: 0
RegisterForType``1(System.Func{``0,System.String} labeler) #

Register a labeler for a specific type. The most specific type match wins (derived types over bases).

Parameters

labeler System.Func{``0,System.String} required
public Void RegisterProjection<T>(Action<DataTablesProjectionBuilder<T>> build) #
Returns: Void

Type Parameters

T

Parameters

build Action<DataTablesProjectionBuilder<T>> requiredposition: 0
RegisterProjection``1(System.Action{HtmlForgeX.DataTablesProjectionBuilder{``0}} build) #

Registers a projection (ordered list of named accessors) for type T. Summarization prefers this projection in AOT scenarios to avoid reflection.

Parameters

build System.Action{HtmlForgeX.DataTablesProjectionBuilder{``0}} required
TryGetAccessor(System.Object arg1, System.String arg2, System.Object@ arg3) #

Tries to fetch a typed accessor value for a property by name (case-insensitive). Searches the exact type and its base types.

Parameters

arg1 System.Object required
arg2 System.String required
arg3 System.Object@ required
TryGetProjection(System.Object arg1, System.Collections.Generic.List{System.ValueTuple{System.String,System.Func{System.Object,System.Object}}}@ arg2) #

Gets a registered projection for the object's runtime type or its base types.

Parameters

arg1 System.Object required
arg2 System.Collections.Generic.List{System.ValueTuple{System.String,System.Func{System.Object,System.Object}}}@ required
TryLabelForProperty(System.String arg1, System.Object arg2, System.String@ arg3) #

Try to label the value using a registered property labeler. Prevents infinite recursion when a property labeler calls back into SmartLabel with the same property header.

Parameters

arg1 System.String required
arg2 System.Object required
arg3 System.String@ required
TryLabelForType(System.Object arg1, System.String@ arg2) #

Try to label the value using a registered type labeler. Chooses the most specific registration.

Parameters

arg1 System.Object required
arg2 System.String@ required

Properties

public List<String> SmartLabelPropertyOrder { get; } #

Gets or sets the property name order consulted by SmartLabel when deriving labels from objects. Clients may overwrite this list to change the search order.