Detailed Method Reference
Namespace: Canley.Utility.CSV.Standard
Class: CSVTable<T>
Definition
public void LoadPolymorphic(CanleyCSVManager manager, string typeColumn = "ClassName")-
Description: An advanced loading method supporting heterogeneous data types by inspecting a specific column to determine which subclass of
Tto instantiate for every individual row. -
Workflow:
- Hierarchy & Pipeline: Follows the identical filename discovery and smart-load pipeline as standard loads.
- Type Column Discovery: Scans the header row to locate the specified type column index.
- Reflection Resolution: Searches loaded assemblies for concrete types matching the row’s type name and inheriting from
T. - Polymorphic Hydration: Instantiates the resolved subclass and processes hydration and meta finalisation.
-
Parameters:
manager: TheCanleyCSVManagerinstance handling file I/O operations.typeColumn: The string name of the CSV column determining subclass types (defaults to"ClassName").
-
Returns:
void -
Example:
public void LoadAbilities(CSVTable<AbilityRecord> abilityTable, CanleyCSVManager csvManager)
{
abilityTable.LoadPolymorphic(csvManager, "EffectType");
}TIP
Use
LoadPolymorphicwhen you need to mix different data types (such as various weapon and armor subclasses) together within a single unified dataset file.