GetObject() public méthode

public GetObject ( GetObjectRequest getObjectRequest, Stream output, Action downloadProcessCallback = null, CancellationToken cancellationToken = null ) : Task
getObjectRequest GetObjectRequest
output Stream
downloadProcessCallback Action
cancellationToken System.Threading.CancellationToken
Résultat Task
Exemple #1
0
        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);

            }
        }