public async Task <bool> ImplementDeletedLocal() { if (DeletedLocalSet == null || DeletedLocalSet.Count() <= 0) { return(true); } var tasks = new List <Task <bool> >(); if (TargetType.Invoke().Equals(typeof(LocalPushUpdating))) { foreach (var elementGetDTO in DeletedLocalSet) { tasks.Add(UpdateProcessing.UpdateWhenStatusOfElementChangeToDeletedAsync(elementGetDTO, _repository)); } } else { foreach (var elementGetDTO in DeletedLocalSet) { tasks.Add(UpdateProcessing.ReGenerateElementBelowLocalAsync(elementGetDTO, _repository)); } } await Task.WhenAll(tasks); return(true); }
public async Task <bool> ImplementDeletedLocal() { if (DeletedLocalSet == null || DeletedLocalSet.Count() <= 0) { return(true); } var tasks = new List <Task <bool> >(); foreach (var element in DeletedLocalSet) { tasks.Add(UpdateProcessing.StatusChangeFromPendingDeleteToDeletedAsync(element, _repository)); } await Task.WhenAll(tasks); return(true); }