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/NzbDrone.Common/Messaging/Tracking/TrackedCommand.cs

30 lines
765 B

using System;
namespace NzbDrone.Common.Messaging.Tracking
{
public class TrackedCommand
{
public String Type { get; private set; }
public ICommand Command { get; private set; }
public CommandState State { get; set; }
public DateTime StateChangeTime { get; set; }
public TimeSpan Runtime { get; set; }
public Exception Exception { get; set; }
public TrackedCommand(ICommand command, CommandState state)
{
Type = command.GetType().FullName;
Command = command;
State = state;
StateChangeTime = DateTime.UtcNow;
}
}
public enum CommandState
{
Running = 0,
Completed = 1,
Failed = 2
}
}