public HudLayoutFilter Clone() { var clone = new HudLayoutFilter { DataFreshness = DataFreshness, TableTypes = TableTypes.ToArray() }; return(clone); }
private static bool CompareTableTypes(HudLayoutFilter filter1, HudLayoutFilter filter2) { var result = filter1.TableTypes == null && filter2.TableTypes == null || filter1.TableTypes == null && filter2.TableTypes != null && !filter2.TableTypes.Any() || filter2.TableTypes == null && filter1.TableTypes != null && !filter1.TableTypes.Any() || filter1.TableTypes != null && filter2.TableTypes != null && !filter1.TableTypes.Any() && !filter2.TableTypes.Any() || filter1.TableTypes != null && filter2.TableTypes != null && filter1.TableTypes.All(x => filter2.TableTypes.Contains(x)) && filter2.TableTypes.All(x => filter1.TableTypes.Contains(x)); return(result); }
public bool Equals(HudLayoutFilter filter) { if (filter == null) { return(false); } var result = (DataFreshness == filter.DataFreshness) && CompareTableTypes(this, filter); return(result); }