PageRenderTime 27ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/Source/Bifrost/Events/IEvent.cs

#
C# | 85 lines | 19 code | 10 blank | 56 comment | 0 complexity | 44384f41b252897a2761eeadc033c69b 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
22using System;
23
24namespace Bifrost.Events
25{
26    /// <summary>
27	/// Defines the basics of an event
28	/// </summary>
29	public interface IEvent
30	{
31		/// <summary>
32		/// Gets the id of the event
33		/// </summary>
34        Guid Id { get; set; }
35
36		/// <summary>
37		/// Gets or sets the name of the command causing the event
38		/// </summary>
39		string CommandName { get; set; }
40
41		/// <summary>
42		/// Gets or sets the name of the event
43		/// </summary>
44		string Name { get; set; }
45
46        /// <summary>
47        /// Gets the EventSource id (Aggregate Root) to which these events belong.
48        /// </summary>
49		Guid EventSourceId { get; set; }
50
51		/// <summary>
52		/// Gets and sets the aggregated root name
53		/// </summary>
54		string AggregatedRoot { get; set; }
55
56		/// <summary>
57		/// Gets and sets the name of the eventsource
58		/// </summary>
59    	string EventSourceName { get; set; }
60
61        /// <summary>
62        /// Gets or sets the version of the event (ChangeSet or something)
63        /// </summary>
64        EventSourceVersion Version { get; set; }
65
66		/// <summary>
67		/// Gets or sets who or what the event was caused by.
68		/// 
69		/// Typically this would be the name of the user or system causing it
70		/// </summary>
71		string CausedBy { get; set; }
72
73		/// <summary>
74		/// Gets or sets the origin of the event.
75		/// 
76		/// Typically this would be what part of the system the event indirectly is coming from
77		/// </summary>
78		string Origin { get; set; }
79
80		/// <summary>
81		/// Gets or sets the time the event occured
82		/// </summary>
83		DateTime Occured { get; set; }
84	}
85}