Exemplo n.º 1
0
        public void CreateRegionWithTallyLoader(ScopeType scope)
        {
            var regionAttributesFactory = new RegionAttributesFactory();

            regionAttributesFactory.SetCacheLoader(m_ldr);
            regionAttributesFactory.SetScope(scope);
            regionAttributesFactory.SetCachingEnabled(true);

            m_region = CacheHelper.CreateRegion(TestRegion,
                                                regionAttributesFactory.Create());
        }
Exemplo n.º 2
0
        public void RegionThreeLoadEntries(int num)
        {
            var regionAttributesFactory = new RegionAttributesFactory();

            regionAttributesFactory.SetScope(ScopeType.Local);
            regionAttributesFactory.SetCacheLoader(m_ldr);
            m_region = CacheHelper.CreateRegion(TestRegion, regionAttributesFactory.Create());
            m_ldr.Reset();
            Thread.Sleep(100);
            DoGets(m_region, num);
            Assert.AreEqual(num, m_ldr.Loads);
            ISerializable[] arr = m_region.GetKeys();
            Assert.AreEqual(num, arr.Length);
        }