using System.Collections.Generic; namespace ExcelKv.Core; // --- Schema Middleware --- public class SchemaRegistry { private Dictionary> _knownSchemas = new(); public void RegisterSchema(string namespaceKey, List newColumns) { if (!_knownSchemas.ContainsKey(namespaceKey)) { _knownSchemas[namespaceKey] = new HashSet(); foreach (var col in newColumns) _knownSchemas[namespaceKey].Add(col); } else { var existing = _knownSchemas[namespaceKey]; foreach (var col in newColumns) if (!existing.Contains(col)) existing.Add(col); } } }