You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/NzbDrone.Core/Messaging/Commands/Command.cs

46 lines
1.2 KiB

11 years ago
using System;
using System.Text.Json.Serialization;
using NzbDrone.Common.Serializer;
11 years ago
namespace NzbDrone.Core.Messaging.Commands
{
[JsonConverter(typeof(PolymorphicWriteOnlyJsonConverter<Command>))]
public abstract class Command
11 years ago
{
private bool _sendUpdatesToClient;
public virtual bool SendUpdatesToClient
{
get
{
return _sendUpdatesToClient;
}
set
{
_sendUpdatesToClient = value;
}
}
11 years ago
public virtual bool UpdateScheduledTask => true;
public virtual string CompletionMessage => "Completed";
public virtual bool RequiresDiskAccess => false;
public virtual bool IsExclusive => false;
11 years ago
public virtual bool IsTypeExclusive => false;
public string Name { get; private set; }
public DateTime? LastExecutionTime { get; set; }
public DateTime? LastStartTime { get; set; }
public CommandTrigger Trigger { get; set; }
public bool SuppressMessages { get; set; }
11 years ago
public string ClientUserAgent { get; set; }
public Command()
11 years ago
{
Name = GetType().Name.Replace("Command", "");
}
}
}