コード例 #1
0
        public HudLayoutFilter Clone()
        {
            var clone = new HudLayoutFilter
            {
                DataFreshness = DataFreshness,
                TableTypes    = TableTypes.ToArray()
            };

            return(clone);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public bool Equals(HudLayoutFilter filter)
        {
            if (filter == null)
            {
                return(false);
            }

            var result = (DataFreshness == filter.DataFreshness) && CompareTableTypes(this, filter);

            return(result);
        }