public async Task <DocumentData> Load(Address sender, Signature signature, Hash hash) { Verify(sender, signature, hash); var document = await dataService.Load(hash); if (document == null) { throw new NotFoundException(); } bool canView = await blockChainService.CanViewDocument(sender, hash); if (!canView) { throw new UnAuthorizedAccessException(); } var stream = await storageService.Load(document.Hash); return(new DocumentData(document.Name, stream, document.When, document.Hash)); }