Engine configuration for UDT supported data types
Currently, UDFs and UDTs have a restricted type list in UserDefinitions.cs that is not customizable per host. It includes Decimal which makes sense for Canvas but doesn't work for C# hosts. We need to generalize this.
- Canvas doesn't want Decimal.
- C# interpreter doesn't want TimeZoneTZInd. Crashes if used.
- Dataverse formula columns want both of these.
This PR uses the Engine.PrimitiveTypes list, to be set by a host that cares about UDFs, UDTs, or JSON serialization. It is null by default, and if a host doesn't use these features, it doesn't matter. RecalcEngine will provide PrimitiveTypes that the interpreter can support, so any hosts using it, which is most hosts, don't need to make a change.
Public API changes:
❌CP0002 M:Microsoft.PowerFx.Engine.set_PrimitiveTypes(Microsoft.PowerFx.ReadOnlySymbolTable)
Public API changes:
❌CP0002 M:Microsoft.PowerFx.Engine.set_PrimitiveTypes(Microsoft.PowerFx.ReadOnlySymbolTable)
✅ No public API change.
✅ No public API change.
✅ No public API change.