Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default configuration #12

Closed
davideicardi opened this issue Nov 1, 2013 · 1 comment
Closed

Default configuration #12

davideicardi opened this issue Nov 1, 2013 · 1 comment
Milestone

Comments

@davideicardi
Copy link
Member

Allow to specify if predefined types should be loaded. Default should be true.

@davideicardi
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant