1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

New: Backend changes for new UI

This commit is contained in:
Qstick
2018-11-23 02:03:32 -05:00
parent e9eebd3ce6
commit 65efa15551
485 changed files with 11177 additions and 2233 deletions
+29
View File
@@ -0,0 +1,29 @@
using System;
using NzbDrone.Core.Datastore.Events;
using Radarr.Http.REST;
namespace Radarr.Http
{
public class ResourceChangeMessage<TResource> where TResource : RestResource
{
public TResource Resource { get; private set; }
public ModelAction Action { get; private set; }
public ResourceChangeMessage(ModelAction action)
{
if (action != ModelAction.Deleted && action != ModelAction.Sync)
{
throw new InvalidOperationException("Resource message without a resource needs to have Delete or Sync as action");
}
Action = action;
}
public ResourceChangeMessage(TResource resource, ModelAction action)
{
Resource = resource;
Action = action;
}
}
}