PageRenderTime 49ms CodeModel.GetById 42ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost/Sagas/SagaHolder.cs

#
C# | 91 lines | 22 code | 11 blank | 58 comment | 0 complexity | 0246f6c16798300a5bc60e161fa8df65 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
23using System;
24
25namespace Bifrost.Sagas
26{
27    /// <summary>
28    /// Represents a holder for a <see cref="ISaga"/> for persisting purposes
29    /// </summary>
30#if(!SILVERLIGHT)
31    [Serializable]
32#endif
33    public class SagaHolder
34    {
35        /// <summary>
36        /// Gets or sets the Id of the actual <see cref="ISaga"/>
37        /// </summary>
38        public Guid Id { get; set; }
39
40        /// <summary>
41        /// Gets or sets the Partition in which the <see cref="ISaga"/> belongs to
42        /// </summary>
43        public string Partition { get; set; }
44
45        /// <summary>
46        /// Gets or sets the Key that represents the <see cref="ISaga"/> within a partition
47        /// </summary>
48        public string Key { get; set; }
49
50        /// <summary>
51        /// Gets or sets the name of the <see cref="ISaga"/>
52        /// </summary>
53        public string Name { get; set; }
54
55        /// <summary>
56        /// Gets or sets the type of the <see cref="ISaga"/>
57        /// </summary>
58        /// <remarks>
59        /// Fully qualified type string
60        /// </remarks>
61        public string Type { get; set; }
62
63        /// <summary>
64        /// Gets or sets the <see cref="SagaState"/> represented as string
65        /// </summary>
66        public string State { get; set; }
67
68        /// <summary>
69        /// Gets or sets the serialized version of the <see cref="ISaga"/>
70        /// </summary>
71        public string SerializedSaga { get; set; }
72
73        /// <summary>
74        /// Gets or sets the current chapters type
75        /// </summary>
76        /// <remarks>
77        /// Fully qualified type string
78        /// </remarks>
79        public string CurrentChapterType { get; set; }
80
81        /// <summary>
82        /// Gets or sets the chapters as serialized data
83        /// </summary>
84        public string SerializedChapters { get; set; }
85
86        /// <summary>
87        /// Gets or sets the uncommited events as serialized data
88        /// </summary>
89        public string UncommittedEvents { get; set; }
90    }
91}