예제 #1
0
        public async Task <T> GetAsync <T>(string name)
        {
            Uri uri = PackUriHelper.CreatePartUri(new Uri(name, UriKind.Relative));

            if (!_package.PartExists(uri))
            {
                throw new FileNotFoundException("The specified item does not exist");
            }

            using Stream input   = _package.GetPart(uri).GetStream();
            using ICryptoFile ef = IOBuilder.CreateFile(Key, input);
            return(await ef.DeserializeAsync <T>().ConfigureAwait(false));
        }