예제 #1
0
        public async ValueTask <SignatureOptions> ReadHeader(CancellationToken ct)
        {
            var header = await _reader.Read <SignatureHeader>(ct).ConfigureAwait(false) ??
                         throw new FormatException($"expected {nameof(SignatureHeader)}; got EOF");

            return(header.Options);
        }
예제 #2
0
파일: Patcher.cs 프로젝트: zmj/rsync-delta
        private async ValueTask ReadHeader(CancellationToken ct)
        {
            var header = await _reader.Read <DeltaHeader>(ct).ConfigureAwait(false);

            if (!header.HasValue)
            {
                throw new FormatException("failed to read delta header");
            }
        }