Default configuration
davideicardi opened this issue · comments
Davide Icardi commented
Allow to specify if predefined types should be loaded. Default should be true.
Davide Icardi commented
Now it should be possible to specify some options when creating the Interpreter:
var target = new Interpreter(InterpreterOptions.Default);
[Flags]
public enum InterpreterOptions
{
None = 0,
/// <summary>
/// Load primitive types like 'string', 'double', 'int', 'DateTime', 'Guid', ...
/// </summary>
PrimitiveTypes = 1,
/// <summary>
/// Load system keywords like 'true', 'false', 'null'
/// </summary>
SystemKeywords = 2,
/// <summary>
/// Load common types like 'System.Math', 'System.Convert'
/// </summary>
CommonTypes = 4,
/// <summary>
/// Load all default configurations: PrimitiveTypes + SystemKeywords + CommonTypes
/// </summary>
Default = PrimitiveTypes | SystemKeywords | CommonTypes
}
Default constructor has the same behavior as before.