Пример #1
0
        public virtual string BuildCaml(SiteQueryWebScope scope)
        {
            string scopeValue = String.Empty;

            switch (scope)
            {
            case SiteQueryWebScope.Recursive:
            {
                scopeValue = "Recursive";
            }
            break;

            case SiteQueryWebScope.SiteCollection:
            {
                scopeValue = "SiteCollection";
            }
            break;

            default:
            {
                scopeValue = String.Empty;
            }
            break;
            }

            return(String.Format("<Webs Scope='{0}' />", scopeValue));
        }
Пример #2
0
 public SiteQuery(Query query, ListsReference listsReference, SiteQueryWebScope webScope, List <SiteQueryFieldReference> viewFields = null)
 {
     this.Query          = query;
     this.ListsReference = listsReference;
     this.WebScope       = webScope;
     this.ViewFields     = viewFields ?? new List <SiteQueryFieldReference>();
 }