Esempio n. 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);
            }
        }
Esempio n. 2
0
 public static ProjectedFieldsCamlElement ShowField(this ProjectedFieldsCamlElement camlProjectedFields, string fieldName, string listAlias, string lookupField)
 {
     if (camlProjectedFields != null)
     {
         camlProjectedFields.Add(new CamlProjectedField(fieldName, listAlias, lookupField));
     }
     return(camlProjectedFields);
 }
Esempio n. 3
0
 public static ProjectedFieldsCamlElement ShowField(this ProjectedFieldsCamlElement camlProjectedFields, ProjectedFieldsCamlElement combinedProjectedFields)
 {
     if (camlProjectedFields != null)
     {
         camlProjectedFields = camlProjectedFields.ShowField(combinedProjectedFields);
     }
     return(camlProjectedFields);
 }
Esempio n. 4
0
 public static ProjectedFieldsCamlElement ShowField(this ProjectedFieldsCamlElement camlProjectedFields, params CamlProjectedField[] projectedFields)
 {
     if (camlProjectedFields != null)
     {
         camlProjectedFields.AddRange(projectedFields);
     }
     return(camlProjectedFields);
 }
Esempio n. 5
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;
 }