Beispiel #1
0
 public void AgregaOpcionIncompatible(OpcionBook bookOptionIncompatible)
 {
     if (!BookOptionsNotSupported.Contains(bookOptionIncompatible))
     {
         BookOptionsNotSupported.Add(bookOptionIncompatible);
         bookOptionIncompatible.AgregaOpcionIncompatible(this);
     }
 }
Beispiel #2
0
        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);
        }