Exemplo n.º 1
0
        public IEnumerable <Product> Get(int page, int size)
        {
            var skip    = page * size;
            var records = ReadonlySet.Skip(skip).Take(size).Select(GetAggregateRoot).ToList();

            return(records);
        }
Exemplo n.º 2
0
		public void ReadonlySet_Clear()
		{
			Set<int> set = new ReadonlySet<int>(new int[] { 1, 2, 3 });
			Assert.AreEqual(3, set.Count);
			Assert.IsTrue(set.IsReadOnly);

			// Use a try/catch so that we know that this call is the one throwing the exception
			try
			{
				set.Clear();
				Assert.Fail("Should have thrown a NotSupportedException");
			}catch (NotSupportedException){ }
		}