Exemplo n.º 1
0
        public void CanSetInclude()
        {
            var hbmCache = new HbmCache();
            var mapper   = new CacheMapper(hbmCache);

            mapper.Include(CacheInclude.NonLazy);
            hbmCache.include.Should().Be(HbmCacheInclude.NonLazy);
        }
Exemplo n.º 2
0
        public void CanSetUsage()
        {
            var hbmCache = new HbmCache();
            var mapper   = new CacheMapper(hbmCache);

            mapper.Usage(CacheUsage.ReadWrite);
            hbmCache.usage.Should().Be(HbmCacheUsage.ReadWrite);
        }
Exemplo n.º 3
0
        public void CanSetRegion()
        {
            var hbmCache = new HbmCache();
            var mapper   = new CacheMapper(hbmCache);

            mapper.Region("pizza");
            hbmCache.region.Should().Be("pizza");
        }
 /// <summary>
 /// Transfers the child cache objects to current instance from the source instance.
 /// Useful for mantaining the cache even in case of refreshes to shard map objects.
 /// </summary>
 /// <param name="source">Source cached shard map to copy child objects from.</param>
 internal void TransferStateFrom(CacheShardMap source)
 {
     this.Mapper = source.Mapper;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Transfers the child cache objects to current instance from the source instance.
 /// Useful for mantaining the cache even in case of refreshes to shard map objects.
 /// </summary>
 /// <param name="source">Source cached shard map to copy child objects from.</param>
 internal void TransferStateFrom(CacheShardMap source)
 {
     this.Mapper = source.Mapper;
 }