BlueCollar.Worker.CreateHistory C# (CSharp) Method

CreateHistory() static private method

Creates a history record from the given working record and status.
static private CreateHistory ( WorkingRecord working, HistoryStatus status ) : HistoryRecord
working WorkingRecord The working record to create the history record for.
status HistoryStatus The status to create the history record with.
return HistoryRecord
        internal static HistoryRecord CreateHistory(WorkingRecord working, HistoryStatus status)
        {
            return new HistoryRecord()
            {
                ApplicationName = working.ApplicationName,
                Data = working.Data,
                FinishedOn = DateTime.UtcNow,
                JobName = working.JobName,
                JobType = working.JobType,
                QueuedOn = working.QueuedOn,
                QueueName = working.QueueName,
                ScheduleId = working.ScheduleId,
                StartedOn = working.StartedOn,
                Status = status,
                TryNumber = working.TryNumber,
                WorkerId = working.WorkerId
            };
        }