Example #1
0
 private async void OnPhotoInserted(object?sender, ImageEventHandler e)
 {
     try
     {
         //throw new Exception("Testing async void");
         await PhotoInserted.InvokeAsync(e.Image);
     }
     catch (Exception ex)
     {
         await OnExecutingError.InvokeAsync(ex);
     }
 }
Example #2
0
        protected internal async Task OnInputFileChange(InputFileChangeEventArgs e)
        {
            try
            {
                _selectedFiles = e.GetMultipleFiles().ToList();
                if (_selectedFiles is null)
                {
                    return;
                }
                var uploaded = await PhotoUploaderLogic.UploadImagesIntoTempAsync(_selectedFiles);

                Message = $"{uploaded} file(s) selected";
            }

            catch (Exception ex)
            {
                await OnExecutingError.InvokeAsync(ex);
            }
        }