示例#1
0
        public void TestMethod1()
        {
            CamlQuery query = new CamlQuery();

            query.Where("Title").Contains("Madrid").And("Title").Contains("España");
            query.OrderBy("Fecha");

            Trace.WriteLine(query.ToString());
            Assert.AreEqual(1, 1);
        }
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            //
            // Any errors in the validation parser mode (second parameter set to true) are considered fatal.
            //
            CamlQuery query = CamlQuery.Parse(_expression, true);

            //
            // Store the CAML query and the entity name.
            //
            info.AddValue("Caml", query.ToString());
            info.AddValue("Entity", query._results.EntityType.Name);

            //
            // Store errors, if any.
            //
            if (query._errors != null)
            {
                info.AddValue("Errors", query._errors);
                info.AddValue("Linq", query._errors.Expression);
            }
        }