private List <IISOViewModel> buildQueryResult(IList <ISerializableObject> result) { CurrentOperation = new AsyncOperationInstance(true, null) { StatusDescription = "SelectFD_Status_FillingResults", Progress = 0, IsProgressIndeterminate = false, }; List <IISOViewModel> list = new List <IISOViewModel>(result.Count()); if (result.Count() == 0) { sendNotification("SelectFD_ResultEmpty"); return(list); } ProgressInterval localProgress = null; localProgress = new ProgressInterval(CurrentOperation, 100f, result.Count()); var conversionQuery = from obj in result select ISOStore.addOrRetrieveVMForISO(obj); foreach (var line in conversionQuery) { list.Add(line); if (localProgress != null) { if (localProgress.IsCancelRequested) { break; } else { localProgress.advance(); } } } return(list); }
private IISOViewModel addOrRetrieveISOVM(ISerializableObject iso) { return(_store.addOrRetrieveVMForISO(iso)); }