/// <summary> /// Root <View> and <Query> nodes. /// </summary> /// <param name="scope">View scope</param> /// <param name="whereClause"><Where> node.</param> /// <param name="viewFields"><ViewFields> node.</param> /// <param name="orderByClause"><OrderBy> node.</param> /// <param name="rowLimit"><RowLimit> node.</param> /// <returns>String to be used in CAML queries</returns> public static string ViewQuery(ViewScope scope, string whereClause = "", string orderByClause = "", string viewFields = "", int rowLimit = 100) { string viewScopeStr = scope == ViewScope.DefaultValue ? string.Empty : scope.ToString(); return(string.Format(VIEW_XML_WRAPPER, viewScopeStr, whereClause, orderByClause, viewFields, rowLimit)); }
/// <summary> /// Root <View> and <Query> nodes. /// </summary> /// <param name="scope">View scope</param> /// <param name="whereClause"><Where> node.</param> /// <param name="viewFields"><ViewFields> node.</param> /// <param name="orderByClause"><OrderBy> node.</param> /// <param name="rowLimit"><RowLimit> node.</param> /// <returns>String to be used in CAML queries</returns> public static string ViewQuery(ViewScope scope, string whereClause = "", string orderByClause = "", string viewFields = "", int rowLimit = 100) { string viewScopeStr = scope == ViewScope.DefaultValue ? string.Empty : scope.ToString(); return string.Format(VIEW_XML_WRAPPER, viewScopeStr, whereClause, orderByClause, viewFields, rowLimit); }