public void Constructor() { SPSHierarchyFilterArgs filterArgs = new SPSHierarchyFilterArgs(null, null, null); Assert.IsNotNull(filterArgs); Assert.IsNull(filterArgs.Web); Assert.IsNull(filterArgs.List); Assert.IsNull(filterArgs.Folder); }
/// <summary> /// Filter the hierarchy. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> /// <returns></returns> private bool DataSourceFilter(object sender, SPSHierarchyFilterArgs args) { if (args.Folder != null) { return(args.Folder.Name.ToUpper().Contains(Filter)); } return(true); }
private bool DataSourceFilter(object sender, SPSHierarchyFilterArgs args) { if (!string.IsNullOrEmpty(FilterWeb) && (args.Web != null)) { return(args.Web.Name.Contains(FilterWeb)); } if (!string.IsNullOrEmpty(FilterList) && (args.List != null)) { return(args.List.Title.Contains(FilterList)); } return(true); }
/// <summary> /// Data Source Filter /// Check if the list needed matches our selection and is added to the data source /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> /// <returns>True if pass the filter</returns> private bool InvokeCollector(object sender, SPSHierarchyFilterArgs args) { if (args.List != null) { bool include = FilterListTitle(args.List.Title); if (include) { Collector(args.Web, args.List); } return(include); } return(true); }
/// <summary> /// Data Source Filter /// Check if the list needed matches our selection and is added to the data source /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> /// <returns>True if pass the filter</returns> private bool DataSourceFilter(object sender, SPSHierarchyFilterArgs args) { if (args.List != null) { bool include = _listsList.Contains(args.List.Title); //Debug.WriteLine(string.Format("{0}Include:{1} - {2}", // include ? " " : "", // args.List.ParentWebUrl, // args.List.Title)); if (include) { FillDataTable(args.Web, args.List); } return(include); } return(true); }