Example #1
0
 internal void RecreateParser()
 {
     lock (_mySyncRoot) {
         FleeExpressionAnalyzer analyzer = new FleeExpressionAnalyzer();
         ExpressionParser       parser   = new ExpressionParser(TextReader.Null, analyzer, this);
         _myProperties.SetValue("ExpressionParser", parser);
     }
 }
Example #2
0
        private void InitializeProperties()
        {
            this.StringComparison  = System.StringComparison.Ordinal;
            this.OwnerMemberAccess = BindingFlags.Public;

            _myProperties.SetToDefault <bool>("CaseSensitive");
            _myProperties.SetToDefault <bool>("Checked");
            _myProperties.SetToDefault <bool>("EmitToAssembly");
            _myProperties.SetToDefault <Type>("ResultType");
            _myProperties.SetToDefault <bool>("IsGeneric");
            _myProperties.SetToDefault <bool>("IntegersAsDoubles");
            _myProperties.SetValue("ParseCulture", CultureInfo.CurrentCulture);
            this.SetParseCulture(this.ParseCulture);
            _myProperties.SetValue("RealLiteralDataType", RealLiteralDataType.Double);
        }
Example #3
0
        public ExpressionContext(object expressionOwner)
        {
            Utility.AssertNotNull(expressionOwner, "expressionOwner");
            _myProperties = new PropertyDictionary();

            _myProperties.SetValue("CalculationEngine", null);
            _myProperties.SetValue("CalcEngineExpressionName", null);
            _myProperties.SetValue("IdentifierParser", null);

            _myProperties.SetValue("ExpressionOwner", expressionOwner);

            _myProperties.SetValue("ParserOptions", new ExpressionParserOptions(this));

            _myProperties.SetValue("Options", new ExpressionOptions(this));
            _myProperties.SetValue("Imports", new ExpressionImports());
            this.Imports.SetContext(this);
            _myVariables = new VariableCollection(this);

            _myProperties.SetToDefault <bool>("NoClone");

            this.RecreateParser();
        }