public async Task UploadSuccess(string id, string returnData) { var file = FileList.FirstOrDefault(x => x.Id.Equals(id)); if (file == null) { return; } file.State = UploadState.Success; file.Progress = 100; file.Response = returnData; _uploadInfo.File = file; await UploadChanged(id, 100); await InvokeAsync(StateHasChanged); if (OnSingleCompleted.HasDelegate) { await OnSingleCompleted.InvokeAsync(_uploadInfo); } if (OnCompleted.HasDelegate && FileList.All(x => (x.State.Equals(UploadState.Success) || x.State.Equals(UploadState.Fail)))) { await OnCompleted.InvokeAsync(_uploadInfo); } }