コード例 #1
0
        public XmlRepository(IWebContext webContext, XmlFileSystem fileSystem)
        {
            this.webContext = webContext;
            this.FileSystem = fileSystem;

            cacheSessionKey  = "CachBroker<" + typeof(TEntity).Name + ">.Cache";
            SecondLevelCache = new ApplicationCache <TEntity>(Dehydrate);
            Cache            = new SessionCache <TEntity>(SecondLevelCache, Hydrate);

            logger.DebugFormat("Constructing {0}, file system: {1}", this, FileSystem);
        }
コード例 #2
0
 public SessionCache(ApplicationCache <TEntity> secondLevelCache, Func <TEntity, TEntity> hydrate)
 {
     this.secondLevelCache = secondLevelCache;
     this.hydrate          = hydrate;
 }