Beispiel #1
0
        public async Task <bool> UploadSession(CloudUpload cloudUpload)
        {
            cloudUpload.SendToBlobAsync(pathname, file, this.id);

            Console.WriteLine("Receive file upload notifications\n");
            await cloudUpload.ReceiveFileUploadNotificationAsync();

            return(true);
        }
        async void UploadSessionClicked(object sender, System.EventArgs e)
        {
            var cloudUpload = new CloudUpload(deviceId, deviceKey, iotHubUri, connectionString);

            uploadSession.IsEnabled  = false;
            discardSession.IsEnabled = false;
            await currentSession.UploadSession(cloudUpload);

            uploadSession.IsEnabled  = true;
            discardSession.IsEnabled = true;
            await DisplayAlert("Successfully Uploaded", currentSession.id, "Ok");

            ExitSession();
        }