private void PerformRemoves() { if (Deletions.Count == 0) { return; } foreach (var tr in Deletions.ToList()) { _contents.RemoveRef(tr); if (tr == null) { continue; } tr.Completed -= Remove; if (Removed != null) { Removed(this, tr); } } Deletions.Clear(); }
private void SetExcludedAndModified(Question question) { question.IsExcluded = Deletions.SingleOrDefault() != null; Deletions.Clear(); if (ModifiedPhrase != null) { question.ModifiedPhrase = ModifiedPhrase; Modification = null; } }
private void PerformRemoves() { if (Deletions.Count == 0) { return; } foreach (var tr in Deletions.ToList()) { _contents.RemoveRef(tr); if (tr == null) { continue; } Kernel.Log.Info("Removing {0} from Node {1}", tr, Name); tr.Completed -= Remove; Removed?.Invoke(this, tr); } Deletions.Clear(); }