Esempio n. 1
0
        /// <summary>
        /// Root &lt;View&gt; and &lt;Query&gt; nodes.
        /// </summary>
        /// <param name="scope">View scope</param>
        /// <param name="whereClause">&lt;Where&gt; node.</param>
        /// <param name="viewFields">&lt;ViewFields&gt; node.</param>
        /// <param name="orderByClause">&lt;OrderBy&gt; node.</param>
        /// <param name="rowLimit">&lt;RowLimit&gt; 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));
        }
Esempio n. 2
0
 /// <summary>
 /// Root &lt;View&gt; and &lt;Query&gt; nodes.
 /// </summary>
 /// <param name="scope">View scope</param>
 /// <param name="whereClause">&lt;Where&gt; node.</param>
 /// <param name="viewFields">&lt;ViewFields&gt; node.</param>
 /// <param name="orderByClause">&lt;OrderBy&gt; node.</param>
 /// <param name="rowLimit">&lt;RowLimit&gt; 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);
 }