Example #1
0
        public DirectoryCache(
            ICommonAccessParameters accessParameters,
            IFactory <IUnsafeDirectoryReader, IDirectoryCache> unsafeDirectoryReaderFactory)
        {
            if (unsafeDirectoryReaderFactory == null)
            {
                throw new ArgumentNullException(nameof(unsafeDirectoryReaderFactory));
            }

            this.accessParameters = accessParameters ?? throw new ArgumentNullException(nameof(accessParameters));
            unsafeDirectoryReader = unsafeDirectoryReaderFactory.Create(this);
        }
Example #2
0
        public DeletionDirectory(
            IDirectoryCache directoryCache,
            int blockId,
            IFactory <IUnsafeDirectoryReader, IDirectoryCache> unsafeDirectoryReaderFactory)
        {
            this.directoryCache = directoryCache ?? throw new ArgumentNullException(nameof(directoryCache));
            if (blockId < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(blockId));
            }

            BlockId = blockId;

            unsafeDirectoryReader = unsafeDirectoryReaderFactory.Create(directoryCache);
        }