コード例 #1
0
		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);