PageRenderTime 26ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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

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