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)); }
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>(); }