Example #1
0
        protected override void OnParsing(XElement existingView)
        {
            var existingQuery = existingView.ElementIgnoreCase(Query.QueryTag);

            if (existingQuery != null)
            {
                Query = new Query(existingQuery);
            }
            var existingRowLimit = existingView.ElementIgnoreCase(CamlRowLimit.RowLimitTag);

            if (existingRowLimit != null)
            {
                RowLimit = new CamlRowLimit(existingRowLimit);
            }
            var existingViewFields = existingView.ElementIgnoreCase(ViewFieldsCamlElement.ViewFieldsTag);

            if (existingViewFields != null)
            {
                ViewFields = new ViewFieldsCamlElement(existingViewFields);
            }
            var existingJoins = existingView.ElementIgnoreCase(JoinsCamlElement.JoinsTag);

            if (existingJoins != null)
            {
                Joins = new JoinsCamlElement(existingJoins);
            }
            var projectedFields = existingView.ElementIgnoreCase(ProjectedFieldsCamlElement.ProjectedFieldsTag);

            if (projectedFields != null)
            {
                ProjectedFields = new ProjectedFieldsCamlElement(projectedFields);
            }
        }
Example #2
0
 public static JoinsCamlElement Join(this JoinsCamlElement camlJoins, JoinsCamlElement combinedCamlJoins)
 {
     if (combinedCamlJoins != null && combinedCamlJoins.Any())
     {
         camlJoins = Join(camlJoins, combinedCamlJoins);
     }
     return(camlJoins);
 }
Example #3
0
 public static JoinsCamlElement Join(this JoinsCamlElement camlJoins, params Join[] joins)
 {
     if (@joins != null && joins.Length > 0)
     {
         camlJoins.AddRange(joins);
     }
     return(camlJoins);
 }
Example #4
0
 public View(IEnumerable <string> viewFields, IEnumerable <Join> joins, IEnumerable <CamlProjectedField> projectedFields, int rowLimit = 0, bool?paged = null) : base(ViewTag)
 {
     Query           = new Query();
     ViewFields      = new ViewFieldsCamlElement(viewFields);
     Joins           = new JoinsCamlElement(joins);
     ProjectedFields = new ProjectedFieldsCamlElement(projectedFields);
     RowLimit        = new CamlRowLimit(rowLimit, paged);
     Scope           = ViewScope.DefaultValue;
 }