public void AgregaOpcionIncompatible(OpcionBook bookOptionIncompatible) { if (!BookOptionsNotSupported.Contains(bookOptionIncompatible)) { BookOptionsNotSupported.Add(bookOptionIncompatible); bookOptionIncompatible.AgregaOpcionIncompatible(this); } }
public IMemento AgregaOpciones(OpcionBook bookOption) { MementoImplementation result = new MementoImplementation(); result.State = bookOptions; IList <OpcionBook> bookOptionsNotSupported = bookOption.BookOptionsNotSupported; foreach (OpcionBook bOption in bookOptionsNotSupported) { bookOptions.Remove(bOption); } bookOptions.Add(bookOption); return(result); }