private ActiveCount(IActiveList<TSource> source, IActiveValue<TParameter> parameter, Func<TSource, bool> predicate, IEnumerable<string> sourcePropertiesToWatch, IEnumerable<string> parameterPropertiesToWatch) 
			: base(source, parameter, sourcePropertiesToWatch, parameterPropertiesToWatch)
		{
			_predicate = predicate;

			_values = new BooleanList();

			Initialize();
		}
Пример #2
0
        public void RandomlyAddItems()
        {
            RandomGenerator.ResetRandomGenerator();

            var list = new List <bool>();
            var sut  = new BooleanList();

            foreach (var value in Enumerable.Range(0, MaxCount))
            {
                var newValue = RandomGenerator.GenerateRandomInteger(0, 2) == 0;
                list.Add(newValue);
                sut.Add(newValue);
                ValidateLists(list, sut);
            }
        }
Пример #3
0
        private void CreateAndFillLists(out IList <bool> listOne, out IList <bool> listTwo)
        {
            var list = new List <bool>();
            var sut  = new BooleanList();

            for (int i = 0; i < MaxCount; ++i)
            {
                var newValue = RandomGenerator.GenerateRandomInteger(0, 2) == 0;
                list.Add(newValue);
                sut.Add(newValue);
            }

            listOne = list;
            listTwo = sut;
        }
Пример #4
0
 public static void SetColumnVisibility(ItemsControl i, BooleanList input) => i.SetValue(ColumnVisibilityProperty, input);