PageRenderTime 40ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Bifrost/Sagas/SagaHolder.cs

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