public XmlStorageIndex(IStorageDriver driver)
        {
            driver.ThrowIfNull(nameof(driver));

            _driver = driver;
            _items  = GetIndex(_driver);
        }
Beispiel #2
0
        public XmlStorage(IStorageDriver storageDriver, IStorageIndex index)
        {
            storageDriver.ThrowIfNull(nameof(storageDriver));
            index.ThrowIfNull(nameof(index));

            _driver = storageDriver;
            _index  = index;

            ClearFilesAndIndex();
        }
        public StorageDriverFacade(string extention, IStorageDriver driver)
        {
            driver.ThrowIfNull(nameof(driver));
            if (extention.Length > 3)
            {
                throw new ArgumentException("extention is too long", nameof(extention));
            }
            PathValidator.ValidateExtention(extention);

            _extention = extention.IsEmpty() ? "" : "." + extention;
            _driver    = driver;
        }