public static string View(QueryContext qc) { string xml = "<View>" + "<Query>" + Where(qc.Query); if (qc.OrderByFields.Count > 0) { xml += OrderBy(qc.OrderByFields); } xml += "</Query>"; if (qc.ViewFields != null && qc.ViewFields.Length > 0) { xml += "<ViewFields>" + ViewFields(qc.ViewFields) + "</ViewFields>"; } if (qc.RowLimit > 0) { xml += "<RowLimit>" + qc.RowLimit + "</RowLimit>"; } xml += "</View>"; return xml; }
public static Select Select(params IFieldRef[] fields) { QueryContext context = new QueryContext(); Select s = new Select(context, fields); return s; }
public static Select Select(uint top) { QueryContext context = new QueryContext(); context.RowLimit = top; Select s = new Select(context, null); return s; }
public static Select Select(uint top, params IFieldRef[] fields) { QueryContext context = new QueryContext(); context.RowLimit = top; Select s = new Select(context, fields); return s; }
public static Select Select() { QueryContext context = new QueryContext(); Select s = new Select(context, null); return s; }
internal Where(QueryContext context, ICAMLExpression expr) : base(context) { context.Query = expr; }
internal Group(QueryContext context, IFieldRef field) : base(context) { context.GroupByField = field; }
internal Select(QueryContext context, params IFieldRef[] fields) : base(context) { context.ViewFields = fields; }
public ReturnableQuerySentence(QueryContext c) : base(c) { }
internal QuerySentence(QueryContext context) { Context = context; }
internal From(QueryContext context, SPList list) : base(context) { context.List = list; }
internal Order(QueryContext context, IFieldRef field, bool desc) : base(context) { context.OrderByFields.Add(field, desc); }