sonarr-repo-only/NzbDrone.Core/Datastore/Events/ModelEvent.cs

27 lines
509 B
C#
Raw Normal View History

2013-07-19 03:47:55 +00:00
using NzbDrone.Common.Messaging;
2013-05-05 21:24:33 +00:00
namespace NzbDrone.Core.Datastore.Events
{
2013-09-11 06:33:47 +00:00
public class ModelEvent <TModel> : IEvent
2013-05-05 21:24:33 +00:00
{
2013-09-11 06:33:47 +00:00
public TModel Model { get; set; }
public ModelAction Action { get; set; }
2013-05-05 21:24:33 +00:00
2013-09-11 06:33:47 +00:00
public ModelEvent(TModel model, ModelAction action)
2013-05-05 21:24:33 +00:00
{
Model = model;
Action = action;
}
}
2013-05-05 21:24:33 +00:00
2013-09-11 06:33:47 +00:00
public enum ModelAction
{
2013-09-11 06:33:47 +00:00
Unknow = 0,
Created = 1,
Updated = 2,
2013-09-11 06:33:47 +00:00
Deleted = 3,
Sync = 4
2013-05-05 21:24:33 +00:00
}
}