Exemple #1
0
        public IList <T> FindByCAML(ICAMLExpression camlExpression)
        {
            var query = new SPQuery
            {
                Query = (new CAMLBuilder(camlExpression)).ToString()
            };

            return(FindByQuery(query));
        }
Exemple #2
0
 private static string GetSingleString(ICAMLExpression caml)
 {
     var expression = caml as CAMLExpression;
     return String.Format(@"<{0}><FieldRef Name=""{1}""/><Value Type=""{2}""><![CDATA[{3}]]></Value></{0}>",
         expression.Operator,
         expression.Column,
         expression.Type,
         expression.Value);
 }
Exemple #3
0
        private static string GetSingleString(ICAMLExpression caml)
        {
            var expression = caml as CAMLExpression;

            return(String.Format(@"<{0}><FieldRef Name=""{1}""/><Value Type=""{2}""><![CDATA[{3}]]></Value></{0}>",
                                 expression.Operator,
                                 expression.Column,
                                 expression.Type,
                                 expression.Value));
        }
Exemple #4
0
        public static string Where(ICAMLExpression expr)
        {
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(@"<Where/>");

            if (expr != null)
            {
                expr.ToCAML(doc.DocumentElement);
            }

            return doc.InnerXml;
        }
 public IList <T> FindByCAML(ICAMLExpression camlExpression)
 {
     throw new System.NotImplementedException();
 }
 private XmlElement GetQueryXml(ICAMLExpression query)
 {
     return(GetQueryXml(new SPQuery {
         Query = (new CAMLBuilder(query)).ToString()
     }));
 }
Exemple #7
0
        public static string Where(ICAMLExpression expr, SPList list)
        {
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(@"<Where/>");

            FieldInternalNameProvider p = new FieldInternalNameProvider(list);

            if (expr != null)
            {
                expr.ToCAML(p, doc.DocumentElement);
            }

            return doc.InnerXml;
        }
Exemple #8
0
        public Where Where(ICAMLExpression q)
        {
            Where where = new Where(this.Context, q);

            return where;
        }
Exemple #9
0
 internal Where(QueryContext context, ICAMLExpression expr)
     : base(context)
 {
     context.Query = expr;
 }
Exemple #10
0
 private static string GetSingleCheckString(ICAMLExpression expression)
 {
     return(String.Format(@"<Where>{0}</Where>", GetSingleString(expression)));
 }
Exemple #11
0
 public CAMLBuilder(ICAMLExpression expression)
 {
     _expression = expression;
 }
Exemple #12
0
 public CAMLBuilder(ICAMLExpression expression)
 {
     _expression = expression;
 }
Exemple #13
0
 private static string GetSingleCheckString(ICAMLExpression expression)
 {
     return String.Format(@"<Where>{0}</Where>", GetSingleString(expression));
 }