/Source/Bifrost/Sagas/Exceptions/InvalidSagaStateTransitionException.cs

# · C# · 74 lines · 28 code · 7 blank · 39 comment · 0 complexity · a6b67a78253adcf8053ea1795555ef35 MD5 · raw file

  1. #region License
  2. //
  3. // Copyright (c) 2008-2012, DoLittle Studios and Komplett ASA
  4. //
  5. // Licensed under the Microsoft Permissive License (Ms-PL), Version 1.1 (the "License")
  6. // With one exception :
  7. // Commercial libraries that is based partly or fully on Bifrost and is sold commercially,
  8. // must obtain a commercial license.
  9. //
  10. // You may not use this file except in compliance with the License.
  11. // You may obtain a copy of the license at
  12. //
  13. // http://bifrost.codeplex.com/license
  14. //
  15. // Unless required by applicable law or agreed to in writing, software
  16. // distributed under the License is distributed on an "AS IS" BASIS,
  17. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. // See the License for the specific language governing permissions and
  19. // limitations under the License.
  20. //
  21. #endregion
  22. using System;
  23. using System.Runtime.Serialization;
  24. namespace Bifrost.Sagas.Exceptions
  25. {
  26. /// <summary>
  27. /// Exception indicating that the transition between two <see cref="SagaState">SagaStates</see> is invalid.
  28. /// </summary>
  29. public class InvalidSagaStateTransitionException : Exception
  30. {
  31. /// <summary>
  32. /// Initializes an <see cref="InvalidSagaStateTransitionException">InvalidSagaStateTransitionException</see>
  33. /// </summary>
  34. public InvalidSagaStateTransitionException()
  35. : base()
  36. {
  37. }
  38. /// <summary>
  39. /// Initializes an <see cref="InvalidSagaStateTransitionException">InvalidSagaStateTransitionException</see>
  40. /// </summary>
  41. /// <param name="message">Error message</param>
  42. public InvalidSagaStateTransitionException(string message)
  43. : base(message)
  44. {
  45. }
  46. /// <summary>
  47. /// Initializes an <see cref="InvalidSagaStateTransitionException">InvalidSagaStateTransitionException</see>
  48. /// </summary>
  49. /// <param name="message">Error message</param>
  50. /// <param name="inner">Inner Exception</param>
  51. public InvalidSagaStateTransitionException(string message, Exception inner)
  52. : base(message, inner)
  53. {
  54. }
  55. #if(!SILVERLIGHT)
  56. /// <summary>
  57. /// Initializes an <see cref="InvalidSagaStateTransitionException">InvalidSagaStateTransitionException</see> for serialization
  58. /// </summary>
  59. /// <param name="info">Serialization Info</param>
  60. /// <param name="context">Streaming Context</param>
  61. protected InvalidSagaStateTransitionException(SerializationInfo info, StreamingContext context)
  62. : base(info, context)
  63. {
  64. }
  65. #endif
  66. }
  67. }