Exemplo n.º 1
0
        private SequenceDetail zMapToSequenceDetail(dataAccess.DataReaderHelper reader)
        {
            Sequence       sequence       = zMapToSequence(reader);
            List <Step>    sequenceSteps  = Converter.FromBinary <List <Step> >(reader.GetFieldValue <byte[]>("Sequence"));
            SequenceDetail sequenceDetail = new SequenceDetail(sequence, sequenceSteps);

            return(sequenceDetail);
        }
Exemplo n.º 2
0
        private ScheduledTaskRunStatistics zMapToScheduledTaskRunStatistics(dataAccess.DataReaderHelper reader)
        {
            ScheduledTaskRunStatistics scheduledTaskRunStatistics = new ScheduledTaskRunStatistics();

            scheduledTaskRunStatistics.StartTimeUtc = reader.GetNullableDateTime("LastRunStartTimeUtc");
            scheduledTaskRunStatistics.EndTimeUtc   = reader.GetNullableDateTime("LastRunEndTimeUtc");
            scheduledTaskRunStatistics.Status       = !reader.IsDBNull("LastRunStatusId") ? (ScheduledTaskStatus)reader.GetInt64("LastRunStatusId") : new ScheduledTaskStatus?();
            scheduledTaskRunStatistics.Error        = reader.GetNullableString("LastRunError");
            return(scheduledTaskRunStatistics);
        }
Exemplo n.º 3
0
        private Sequence zMapToSequence(dataAccess.DataReaderHelper reader)
        {
            Sequence seq = new Sequence();

            seq.SequenceId   = reader.GetInt64("SequenceId");
            seq.Name         = reader.GetString("SequenceName");
            seq.SequenceType = (SequenceType)reader.GetInt64("SequenceTypeId");
            seq.StepCount    = reader.GetInt64("StepCount");
            seq.IsDeleted    = reader.GetBoolean("SequenceIsDeleted");
            return(seq);
        }
Exemplo n.º 4
0
        private ScheduledTask zMapToScheduledTask(dataAccess.DataReaderHelper reader)
        {
            ScheduledTaskRunStatistics lastRunStatistics = zMapToScheduledTaskRunStatistics(reader);
            ScheduledTask scheduledTask = new ScheduledTask(lastRunStatistics);

            scheduledTask.ScheduledTaskId = reader.GetInt64("ScheduledTaskId");
            scheduledTask.TaskName        = reader.GetString("TaskName");
            scheduledTask.RunSchedule     = Converter.FromBinary <Schedule>(reader.GetFieldValue <byte[]>("Schedule"));
            string runDurationLimit = reader.GetNullableString("RunDurationLimit");

            scheduledTask.RunDurationLimit = runDurationLimit != null?TimeSpan.Parse(runDurationLimit) : new TimeSpan?();

            scheduledTask.Enabled   = reader.GetBoolean("Enabled");
            scheduledTask.IsDeleted = reader.GetBoolean("ScheduledTaskIsDeleted");
            scheduledTask.NextScheduledRunTimeUtc = reader.GetNullableDateTime("NextScheduledRunTimeUtc");
            if (!reader.IsDBNull("SequenceId"))
            {
                scheduledTask.TaskSequence = zMapToSequence(reader);
            }
            return(scheduledTask);
        }