PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost/Sagas/Exceptions/UnknownSagaStateException.cs

#
C# | 74 lines | 28 code | 7 blank | 39 comment | 0 complexity | 45e851f7143387dc1dcca3de572ff523 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  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. /// Represents an exceptional situation where an <see cref="ISaga">Saga</see> is in an unknown <see cref="SagaState">State</see>
  28. /// </summary>
  29. public class UnknownSagaStateException : Exception
  30. {
  31. /// <summary>
  32. /// Initializes an <see cref="UnknownSagaStateException">UnknownSagaStateException</see>
  33. /// </summary>
  34. public UnknownSagaStateException()
  35. : base()
  36. {
  37. }
  38. /// <summary>
  39. /// Initializes an <see cref="UnknownSagaStateException">UnknownSagaStateException</see>
  40. /// </summary>
  41. /// <param name="message">Error message</param>
  42. public UnknownSagaStateException(string message)
  43. : base(message)
  44. {
  45. }
  46. /// <summary>
  47. /// Initializes an <see cref="UnknownSagaStateException">UnknownSagaStateException</see>
  48. /// </summary>
  49. /// <param name="message">Error message</param>
  50. /// <param name="inner">Inner exception</param>
  51. public UnknownSagaStateException(string message, Exception inner)
  52. : base(message, inner)
  53. {
  54. }
  55. #if(!SILVERLIGHT)
  56. /// <summary>
  57. /// Initializes an <see cref="UnknownSagaStateException">UnknownSagaStateException</see> for serialization
  58. /// </summary>
  59. /// <param name="info">Serialization Info</param>
  60. /// <param name="context">Streaming Context</param>
  61. protected UnknownSagaStateException(SerializationInfo info, StreamingContext context)
  62. : base(info, context)
  63. {
  64. }
  65. #endif
  66. }
  67. }