/// <summary>
        /// Initializes a new instance of the <see cref="PageStreamFactory"/> class.
        /// It requires passing a <see cref="PageBuffer"/> for generation a Page with define length.
        /// </summary>
        /// <param name="pageBuffer">A <see cref="pageBuffer"/> </param>
        private PageStreamFactory(IPageBuffer pageBuffer)
        {
            if (pageBuffer == null)
            {
                throw new ArgumentNullException(nameof(pageBuffer));
            }

            this.pageBuffer = new ConcurrentPageBuffer(pageBuffer, lockToken);
        }
Beispiel #2
0
 public ConcurrentPageBuffer(IPageBuffer pageBuffer, object lockToken)
 {
     this.pageBuffer = pageBuffer ?? throw new ArgumentNullException(nameof(pageBuffer));
     this.lockToken  = lockToken ?? throw new ArgumentNullException(nameof(lockToken));
 }