Пример #1
0
        public static object Evaluate(OPathDocument opathDocument, OPathExpression opathExpression)
        {
            OPathNavigator targetNavigator = CreateNavigator(opathDocument);

            object opathValue = targetNavigator.Evaluate(opathExpression, OPathOptions.Defaults);

            return(opathValue);
        }
Пример #2
0
        private OPathNavigator(OPathDocument opathDocument)
        {
            RegisterCustomTypeConverters();

            RegisterCustomFunctions();

            m_OPathDocument = opathDocument;
        }
Пример #3
0
        public static object Evaluate(OPathDocument opathDocument, OPathExpression opathExpression,
                                      OPathOptions opathOptions, object defaultValue, ValueLogger valueLogger)
        {
            OPathNavigator targetNavigator = CreateNavigator(opathDocument);

            object opathValue =
                targetNavigator.Evaluate(opathExpression, opathOptions, defaultValue, valueLogger);

            return(opathValue);
        }
Пример #4
0
        public object Evaluate(OPathExpression opathExpression, OPathOptions opathOptions,
                               object defaultValue, ValueLogger valueLogger)
        {
            object evaluatedExpression;

            if (m_OPathDocument == null)
            {
                m_OPathDocument = new OPathDocument();
            }

            if (opathExpression.IsSingleVariable())
            {
                evaluatedExpression =
                    EvaluateSingleVariable(opathExpression, opathOptions, defaultValue, valueLogger);
            }
            else
            {
                evaluatedExpression =
                    EvaluateOPathExpression(opathExpression, opathOptions, defaultValue, valueLogger);
            }

            return(evaluatedExpression);
        }
Пример #5
0
        public static OPathNavigator CreateNavigator(OPathDocument opathDocument)
        {
            OPathNavigator opathNavigator = new OPathNavigator(opathDocument);

            return(opathNavigator);
        }