Exemple #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);
        }
Exemple #2
0
 protected IEnumerable <TEntity> GetAll()
 {
     return(FileSystem.GetFiles <TEntity>().Select(path => Get(XmlFileSystem.ExtractId(path))));
 }
 public XmlContentRepository(IDefinitionManager definitions, IWebContext webContext, XmlFileSystem fileSystem, IItemXmlWriter writer, IItemXmlReader reader, IItemNotifier notifier)
     : base(webContext, fileSystem)
 {
     this.definitions = definitions;
     this.writer      = writer;
     this.reader      = reader;
     this.notifier    = notifier;
 }