PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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