public GetObject ( |
||
getObjectRequest | ||
output | Stream | |
downloadProcessCallback | Action |
|
cancellationToken | ||
return | Task |
static async void getObject() { try { OssClient temp = new OssClient("bm9crcnr0rtnuw8bnrfvq7w8", "RbtJoExTnA8vYLynUfDh7Ior+oM="); OssObject result = await temp.GetObject("devdoc", "c# 5.0.pdf", callback); FileStream fs = new FileStream(@"C:\Users\yangzhl\Desktop\c# 5.0.pdf", FileMode.Open); byte[] buffer = new byte[fs.Length]; result.Content.Read(buffer, 0, buffer.Length); byte[] sh = MD5.Create().ComputeHash(buffer); string hashCode = BitConverter.ToString(sh).Replace("-", string.Empty).ToLower(); } catch (AggregateException ex) { Console.WriteLine(ex.Message); } }