protected override void Initialize(LSEventArgs copy) { var methodName = "Initialize"; base.Initialize(copy); Int64 targetEntityId; int targetPriority, targetSubPriority; DateTime targetTimeQueued; TargetTypes targetType; if (copy.Args.Length < 7) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Args array is is missing elements."); return; } if (!Int64.TryParse(copy.Args[2], out targetEntityId)) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Unable to parse target entity ID {0}", copy.Args[2]); } if (!int.TryParse(copy.Args[3], out targetPriority)) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Unable to parse target priority {0}", copy.Args[3]); } if (!int.TryParse(copy.Args[4], out targetSubPriority)) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Unable to parse target sub priority {0}", copy.Args[4]); } if (!DateTime.TryParse(copy.Args[5], out targetTimeQueued)) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Unable to parse target time queued {0}", copy.Args[5]); } if (!TargetTypes.TryParse(copy.Args[6], out targetType)) { _logging.LogMessage(ObjectName, methodName, LogSeverityTypes.Standard, "Unable to parse target type {0}", copy.Args[6]); } Target = new QueueTarget(targetEntityId, targetPriority, targetSubPriority, targetType); }