public void CopyFromSourceWord(Stage3ResultElement sourceWord) { base.CopyFromSourceWord(sourceWord); RowId = sourceWord.RowId; SimpleSentenceNr = sourceWord.SimpleSentenceNr; }
private Stage1ResultElement _searchForAnotherItemAndAddIt(Stage1ResultElement cItem, int rowId) { // добавляем текущий Stage3ResultElement item = new Stage3ResultElement(); item.CopyFromSourceWord(cItem); item.ServiceParts = cItem.ServiceParts; item.RowId = rowId; if (Result.Items.Find(x => x.Id == item.Id) == null) Result.Items.Add(item); // ищем следующий cItem = _stage1Result.Items.Find(x => x.ConjuctedWithId == cItem.Id || cItem.ServiceParts.Select(y => y.Id).Contains(x.ConjuctedWithId) && x.Id != cItem.Id); if (cItem != null) _searchForAnotherItemAndAddIt(cItem, rowId); return cItem; }