Пример #1
0
            public async Task <bool> SealFile()
            {
                try
                {
                    var result = await _blobClient.SealAsync();

                    return(result != null);
                }
                catch (Azure.RequestFailedException e)
                {
                    if (e.Status == 404)
                    {
                        throw new FileNotFoundException($"The file {_blobClient.Name} can not be found");
                    }
                    else if (e.Status == 401)
                    {
                        throw new UnauthorizedAccessException(e.Message, e);
                    }
                    throw new IOException(e.Message, e);
                }
            }