📊 Key Public API & Events
Use these methods and events in the CanleyCSVManager class to keep your data pipelines clean and robust.
📥 Events
OnDataLoaded: The primary hook for post-parsing logic. Subscribe to this to trigger UI refreshes or data binding once the CSV is ready.
// Example usage in your script
void Start() {
csvManager.OnDataLoaded += MyPopulateMethod;
}
void MyPopulateMethod() {
// Access the reader once data is confirmed loaded
string firstUser = csvManager.Reader.GetCell(0, "UserName");
}🛠 Detailed Method Reference
Select a class below to view its full list of methods, parameters, and code examples:
| Class | Description |
|---|---|
| CanleyCSVManager | The main entry point for loading files, parsing raw strings, and handling save I/O. |
| CanleyCSVReader | The high-performance parsing engine for safe, index-based data retrieval. |
| CanleyCSVWriter | Static utility for exporting C# data collections into RFC 4180 compliant strings. |
💾 File & I/O
SaveToFile(): Commit your current data state to a persistent file with automatic directory integrity checks.
🌍 Global Formatting Switch
To ensure numeric consistency across different regional settings (e.g., using . instead of , for decimals):
CanleyCSVManager.UseInvariantCulture = true;