/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (FilterMethods != null) { hashCode = hashCode * 59 + FilterMethods.GetHashCode(); } if (FilterEnableSafeUserAgents != null) { hashCode = hashCode * 59 + FilterEnableSafeUserAgents.GetHashCode(); } if (FilterSafeUserAgents != null) { hashCode = hashCode * 59 + FilterSafeUserAgents.GetHashCode(); } if (FilterExcludedPaths != null) { hashCode = hashCode * 59 + FilterExcludedPaths.GetHashCode(); } return(hashCode); } }
private void ButtonStarredFilter_Click(object sender, RoutedEventArgs e) { filterMethod = FilterMethods.Starred; todoList.ListName = this.FindResource("Dict_Starred") as string; this.Dispatcher.Invoke(Filter); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (AllowEmpty != null) { hashCode = hashCode * 59 + AllowEmpty.GetHashCode(); } if (AllowHosts != null) { hashCode = hashCode * 59 + AllowHosts.GetHashCode(); } if (AllowHostsRegexp != null) { hashCode = hashCode * 59 + AllowHostsRegexp.GetHashCode(); } if (FilterMethods != null) { hashCode = hashCode * 59 + FilterMethods.GetHashCode(); } if (ExcludeAgentsRegexp != null) { hashCode = hashCode * 59 + ExcludeAgentsRegexp.GetHashCode(); } return(hashCode); } }
public static IEnumerable <Filter> GetFilter(T filter, FilterMethods filterMethods) { var filterType = typeof(T); var filterProperties = filterType.GetProperties(); foreach (var prop in filterProperties) { var propValue = prop.GetValue(filter); var operations = filterMethods.Operations; var operation = operations .SingleOrDefault(x => x.FilterName == prop.Name); if (propValue == null) { continue; } if (prop.Name == "filterMethods") { break; } if (operation != null) { yield return new Filter { PropertyName = prop.Name, Operation = operation.Operation, Value = propValue } } ; } } }
private void ButtonDueDateFilter_Click(object sender, RoutedEventArgs e) { filterMethod = FilterMethods.Planned; todoList.ListName = this.FindResource("Dict_Reminder") as string; this.Dispatcher.Invoke(Filter); }
/// <summary> /// Returns true if ComAdobeGraniteCsrfImplCSRFFilterProperties instances are equal /// </summary> /// <param name="other">Instance of ComAdobeGraniteCsrfImplCSRFFilterProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComAdobeGraniteCsrfImplCSRFFilterProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FilterMethods == other.FilterMethods || FilterMethods != null && FilterMethods.Equals(other.FilterMethods) ) && ( FilterEnableSafeUserAgents == other.FilterEnableSafeUserAgents || FilterEnableSafeUserAgents != null && FilterEnableSafeUserAgents.Equals(other.FilterEnableSafeUserAgents) ) && ( FilterSafeUserAgents == other.FilterSafeUserAgents || FilterSafeUserAgents != null && FilterSafeUserAgents.Equals(other.FilterSafeUserAgents) ) && ( FilterExcludedPaths == other.FilterExcludedPaths || FilterExcludedPaths != null && FilterExcludedPaths.Equals(other.FilterExcludedPaths) )); }
private void ButtonAllTasks_Click(object sender, RoutedEventArgs e) { filterMethod = FilterMethods.None; todoList.ListName = this.FindResource("Dict_AllItems") as string; this.Dispatcher.Invoke(Filter); }
public async Task <List <CategoryPublicDetails> > Handle(FilterCategoriesQuery request, CancellationToken cancellationToken) { Categories = await _mediator.Send(new GetPublicCategoriesListQuery(), cancellationToken); Categories = FilterMethods.RunKeywordFilter(Categories, request.Keyword); return(Categories); }
public IViewComponentResult Invoke(int?FilterId, string FilterName, string FilterKindCode) { List <FilterItems> _FilterItems = FilterMethods.GetFilterItems(null, FilterId); ViewBag.FilterName = FilterName; ViewBag.FilterKindCode = FilterKindCode; ViewBag.FilterId = FilterId; ViewBag.FilterAtributes = FilterMethods.GetFilterAtributes(null, FilterId); return(View($"~/Views/Tovars/Filter/{FilterKindCode}.cshtml", _FilterItems)); }
public async Task <ICollection <RecipePublicDetails> > Handle(FilterRecipesQuery request, CancellationToken cancellationToken) { _recipes = await _mediator.Send(new GetPublicRecipesListQuery(), cancellationToken); _recipes = FilterMethods.RunKeywordFilter(_recipes, request.Keyword); await RunCategoriesFilter(request.CategoryIds); return(_recipes); }
public IActionResult ReviewTovars(int?Id, int?TovarGroupId) { //Діні потрібні для формування фільтрів---------------------------------------------- ViewBag.Id = Id; ViewBag.TovarGroupId = TovarGroupId; ViewBag.ListFilter = FilterMethods.GetFiltersForTovars(null, TovarGroupId); List <FilterParam> Params = new List <FilterParam>(); //----------------------------------------------------------------------------------- Params.Add(new FilterParam() { Id = "TovarGroupId", Value = TovarGroupId.ToString() }); Params.Add(new FilterParam() { Id = "NumPage", Value = "1" }); ViewBag.TovarsAll = GetTovars(Params); return(View()); }
private void LoadTodoList(FilterMethods filterMethod, SortMethods sortMethods) { currentInventory = todoManager.Filter(filterMethod); currentInventory = todoManager.Sort(sortMethods, currentInventory); if (TodoItemsStackPanel.Children.Count != 0) { TodoItemsStackPanel.Children.Clear(); } foreach (var item in currentInventory) { Itembar itembar = new Itembar(item); itembar.Click += new EventHandler(this.Itembar_Click); itembar.Remove += new EventHandler(this.Itembar_Remove); itembar.Update += new EventHandler(this.Itembar_Update); itembar.UpdateChosenTag += new EventHandler(this.Itembar_UpdateChosenTag); TodoItemsStackPanel.Children.Add(itembar); } }
/// <summary> /// Returns true if OrgApacheSlingSecurityImplReferrerFilterProperties instances are equal /// </summary> /// <param name="other">Instance of OrgApacheSlingSecurityImplReferrerFilterProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrgApacheSlingSecurityImplReferrerFilterProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AllowEmpty == other.AllowEmpty || AllowEmpty != null && AllowEmpty.Equals(other.AllowEmpty) ) && ( AllowHosts == other.AllowHosts || AllowHosts != null && AllowHosts.Equals(other.AllowHosts) ) && ( AllowHostsRegexp == other.AllowHostsRegexp || AllowHostsRegexp != null && AllowHostsRegexp.Equals(other.AllowHostsRegexp) ) && ( FilterMethods == other.FilterMethods || FilterMethods != null && FilterMethods.Equals(other.FilterMethods) ) && ( ExcludeAgentsRegexp == other.ExcludeAgentsRegexp || ExcludeAgentsRegexp != null && ExcludeAgentsRegexp.Equals(other.ExcludeAgentsRegexp) )); }
private void SetFilter(FilterMethods filterMethod) { LoadTodoList(filterMethod, SortMethods.ID); OnItemCountChanged(); }
public FilterMethodAttribute(FilterMethods methodName, ConditionalOperators conditionalOperator, string propertyName = null) : this(methodName, propertyName) { ConditionalOperator = conditionalOperator; }
public FilterMethodAttribute(FilterMethods methodName, string propertyName = null) { MethodName = methodName.ToString(); PropertyName = propertyName; }
//Filter do to items #region Filter public List <Todo> Filter(FilterMethods method) { Inventory = Retrieve(); switch (method) { //return all items in Inventory list case FilterMethods.None: { return(Inventory); } //return planned item in Inventory list case FilterMethods.Planned: { List <Todo> list = new List <Todo>(); foreach (var item in Inventory) { if (item.ReminderState != ReminderState.None) { list.Add(item); } } return(list); } //return starred item in Inventory list case FilterMethods.Starred: { List <Todo> list = new List <Todo>(); foreach (var item in Inventory) { if (item.IsStarred) { list.Add(item); } } return(list); } //return completed item in Inventory list case FilterMethods.Completed: { List <Todo> list = new List <Todo>(); foreach (var item in Inventory) { if (item.IsCompleted) { list.Add(item); } } return(list); } //return completed item in Inventory list case FilterMethods.TaskToday: { List <Todo> list = new List <Todo>(); foreach (var item in Filter(FilterMethods.Planned)) { switch (item.ReminderState) { case ReminderState.Basic: { if (item.EndDateTime.Value.Date == DateTime.Today) { list.Add(item); } break; } case ReminderState.Advance: { if (item.BeginDateTime.Value.Date == DateTime.Today || item.EndDateTime.Value.Date == DateTime.Today) { list.Add(item); } break; } default: break; } } return(list); } default: { return(null); } } }
public IEnumerable <POCO.TrnSales> GetSalesReport(TrnSalesFilter filter = null, FilterMethods filterMethods = null) { return(_TrnSales.BulkRead(filter, filterMethods)); }