Exemplo n.º 1
0
        public virtual void ReadXml(XmlReader reader)
        {
            var @operator = ExpressionSerialization.ReadExpressionOperator(reader);

            if (@operator != null)
            {
                Operator = (LogicalOperator)Enum.Parse(typeof(LogicalOperator), @operator, true);
            }

            var result = new List <IExpression>();

            using (var subTree = reader.ReadSubtree())
            {
                //Skip root node
                subTree.MoveToContent();
                subTree.Read();

                while (subTree.IsStartElement())
                {
                    result.Add(ExpressionSerialization.ReadNode(subTree));
                    subTree.Read();
                }
            }

            reader.Skip();
            Expressions = result.ToArray();
        }
Exemplo n.º 2
0
        public override void ReadXml(XmlReader reader)
        {
            base.ReadXml(reader);
            Query = ExpressionSerialization.ReadSubsetExpressionQuery(reader);

            using (var subTree = reader.ReadSubtree())
            {
                //Skip root node
                subTree.MoveToContent();
                subTree.Read();

                if (subTree.IsStartElement())
                {
                    Subset = ExpressionSerialization.ReadNode(subTree);
                }
            }
        }