/// <summary> /// Gets the filter. /// </summary> /// <param name="options">The options.</param> /// <returns> /// The filter. /// </returns> protected override string GetFilter(SelectItemOptions options) { Assert.ArgumentNotNull((object)options, "options"); if (options.IncludeTemplatesForDisplay.Count == 0 && options.ExcludeTemplatesForDisplay.Count == 0) { return(string.Empty); } string list1 = SelectItemForm.GetList(options.IncludeTemplatesForDisplay); string list2 = SelectItemForm.GetList(options.ExcludeTemplatesForDisplay); if (options.IncludeTemplatesForDisplay.Count > 0 && options.ExcludeTemplatesForDisplay.Count > 0) { return(string.Format("(contains('{0}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ',')) and not (contains('{1}', ',' + @@templateid + ',') or contains('{1}', ',' + @@templatekey + ','))", (object)list1, (object)list2)); } if (options.IncludeTemplatesForDisplay.Count > 0) { return(string.Format("(contains('{0}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ','))", (object)list1)); } else { return("not (contains('{ExcludeList}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ',') or @@name='Placeholder Settings' or @@name='Devices' or @@name='Layouts' or @@id='{B4A0FB13-9758-427C-A7EB-1A406C045192}')".Replace("{ExcludeList}", list2)); } }
/// <summary> /// Gets the filter. /// </summary> /// <param name="options">The options.</param> /// <returns> /// The filter. /// </returns> protected override string GetFilter(SelectItemOptions options) { Assert.ArgumentNotNull((object)options, "options"); if (options.IncludeTemplatesForDisplay.Count == 0 && options.ExcludeTemplatesForDisplay.Count == 0) { return(string.Empty); } string list1 = SelectItemForm.GetList(options.IncludeTemplatesForDisplay); string list2 = SelectItemForm.GetList(options.ExcludeTemplatesForDisplay); if (options.IncludeTemplatesForDisplay.Count > 0 && options.ExcludeTemplatesForDisplay.Count > 0) { return(string.Format("(contains('{0}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ',')) and not (contains('{1}', ',' + @@templateid + ',') or contains('{1}', ',' + @@templatekey + ','))", (object)list1, (object)list2)); } if (options.IncludeTemplatesForDisplay.Count > 0) { return(string.Format("(contains('{0}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ','))", (object)list1)); } string str1 = "{B4A0FB13-9758-427C-A7EB-1A406C045192}"; string str2 = "{B87CD5F0-4E72-429D-90A3-B285F1D038CA}"; string str3 = "{75D27C2B-5F88-4CC8-B1DE-8412A1628408}"; return(string.Format("not (contains('{0}', ',' + @@templateid + ',') or contains('{0}', ',' + @@templatekey + ',') or @@name='Placeholder Settings' or @@name='Devices' or @@name='Layouts' or @@id='{1}' or @@id='{2}' or @@id='{3}' or @@id='{4}')", (object)list2, (object)str1, (object)DeviceSimulationUtil.SimulatorsFolderId, (object)str2, (object)str3)); }