public UpdateStudyCommand(ServerPartition partition,
StudyStorageLocation studyLocation,
IList<BaseImageLevelUpdateCommand> imageLevelCommands,
ServerRuleApplyTimeEnum applyTime,
WorkQueue workQueue)
: base("Update existing study")
{
_partition = partition;
_oldStudyLocation = studyLocation;
_commands = imageLevelCommands;
_workQueue = workQueue;
_statistics = new UpdateStudyStatistics(_oldStudyLocation.StudyInstanceUid);
// Load the engine for editing rules.
_rulesEngine = new ServerRulesEngine(applyTime, _partition.Key);
if (applyTime.Equals(ServerRuleApplyTimeEnum.SopProcessed))
_rulesEngine.AddIncludeType(ServerRuleTypeEnum.AutoRoute);
_rulesEngine.Load();
}