示例#1
0
        /// <summary>
        /// Creates CAML lists by with the specified arguments.
        /// </summary>
        /// <param name="baseType">Type of the base.</param>
        /// <param name="listElements">The list elements.</param>
        /// <param name="serverTemplate">The server template.</param>
        /// <param name="includeHiddenLists">if set to <c>true</c> [include hidden lists].</param>
        /// <param name="maxListLimit">The maximum list limit.</param>
        /// <returns>
        /// A string representation of the CAML query.
        /// </returns>
        public string Lists(CamlEnums.BaseType baseType, string listElements, string serverTemplate, bool includeHiddenLists, int maxListLimit)
        {
            var stringBuilder = new StringBuilder();

            stringBuilder.AppendFormat("<Lists BaseType=\"{0}\"", (int)baseType);
            if (!string.IsNullOrEmpty(serverTemplate))
            {
                stringBuilder.AppendFormat(" ServerTemplate=\"{0}\"", serverTemplate);
            }

            stringBuilder.AppendFormat(" Hidden=\"{0}\"", includeHiddenLists ? "TRUE" : "FALSE");
            stringBuilder.AppendFormat(" MaxListLimit=\"{0}\"", maxListLimit);
            stringBuilder.AppendFormat(">{0}</Lists>", listElements);

            return(stringBuilder.ToString());
        }
示例#2
0
 /// <summary>
 /// Creates CAML lists by with the specified arguments.
 /// </summary>
 /// <param name="baseType">Type of the base.</param>
 /// <param name="listElements">The list elements.</param>
 /// <param name="serverTemplate">The server template.</param>
 /// <returns>
 /// A string representation of the CAML query.
 /// </returns>
 public string Lists(CamlEnums.BaseType baseType, string listElements, string serverTemplate)
 {
     return(this.Lists(baseType, listElements, serverTemplate, false, 0));
 }
示例#3
0
 /// <summary>
 /// Creates CAML lists by with the specified arguments.
 /// </summary>
 /// <param name="baseType">Type of the base.</param>
 /// <param name="listElements">The list elements.</param>
 /// <param name="serverTemplate">The server template.</param>
 /// <param name="includeHiddenLists">if set to <c>true</c> [include hidden lists].</param>
 /// <returns>
 /// A string representation of the CAML query.
 /// </returns>
 public string Lists(CamlEnums.BaseType baseType, string listElements, string serverTemplate, bool includeHiddenLists)
 {
     return(this.Lists(baseType, listElements, serverTemplate, includeHiddenLists, 0));
 }
示例#4
0
 /// <summary>
 /// Creates CAML lists by with the specified arguments.
 /// </summary>
 /// <param name="baseType">Type of the base.</param>
 /// <param name="listElements">The list elements.</param>
 /// <returns>
 /// A string representation of the CAML query.
 /// </returns>
 public string Lists(CamlEnums.BaseType baseType, string listElements)
 {
     return(this.Lists(baseType, listElements, null, false, 0));
 }