1 #region Copyright ©  2003-2008 Richard Beauchamp <rbeauchamp@gmail.com>
   2 
   3 /*
   4 * DomainObjects for .NET
   5 * Copyright ©  2003-2008 Richard Beauchamp
   6 *
   7 * This library is free software; you can redistribute it and/or
   8 * modify it under the terms of the GNU Lesser General Public
   9 * License as published by the Free Software Foundation; either
  10 * version 2.1 of the License, or (at your option) any later version.
  11 *
  12 * This library is distributed in the hope that it will be useful,
  13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15 * Lesser General Public License for more details.
  16 *
  17 * You should have received a copy of the GNU Lesser General Public
  18 * License along with this library; if not, write to the Free Software
  19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  20 */
  21 
  22 #endregion
  23 
  24 using DomainObjects.Facade.Command;
  25 using DomainObjects.Facade.Domain;
  26 using DomainObjects.Facade.Transaction;
  27 using DomainObjects.Test.TestFixture;
  28 
  29 namespace DomainObjects.Test.TestType.Service
  30 {
  31   /// <summary>
  32   /// Provides a transactional service to the <see cref="ObjectTransactionTests"/> unit tests.
  33   ///
  34   /// This class is referred to by ITransactionSetAware interface documentation.
  35   /// </summary>
  36   [Transaction(TransactionOption.Required, typeof (ReorderValidator))]
  37   public sealed class ReorderValidationService : Service<ReorderValidationService>
  38   {
  39     /// <summary>
  40     /// After this method is called and the transaction has committed,
  41     /// DomainObjects will call <see cref="ReorderValidator.AfterCommit"/>.
  42     /// </summary>
  43     /// <param name="objectsToPersist">The objects to persist.</param>
  44     public void Persist(params TransactableObject[] objectsToPersist)
  45     {
  46       PersistenceFacade.Persist(objectsToPersist);
  47     }
  48   }
  49 }