public static JobExecution Build(Action<JobExecutionFactoryContext> with) { return with.Apply(context => { return new JobExecution { Identifier = context.Entry.Identifier, Deploy = Deploy(context), NextRun = NextRun(context), Job = context.Entry.Job, Progress = new JobExecutionProgress { GetStatus = GetStatus(context), OnScheduled = OnScheduled(context), OnStarted = OnStarted(context), OnCompleted = OnCompleted(context), OnFailed = OnFailed(context), GetPid = GetPid(context) }, Metrics = new JobExecutionMetrics { OnMemory = OnMemory(context), OnProcessor = OnProcessor(context) } }; }); }
public static BlobRepository Create(Action<BlobRepositoryFactoryContext> with) { return with.Apply(context => { return new BlobRepository { GetById = GetById(context), New = New(context) }; }); }
public static JobTaskRepository Create(Action<JobTaskRepositoryFactoryContext> with) { return with.Apply(context => { return new JobTaskRepository { New = New(context), GetByJob = GetByJob(context) }; }); }
public static JobRepository Create(Action<JobRepositoryFactoryContext> with) { return with.Apply(context => { return new JobRepository { New = New(context), All = All(context), Single = Single(context), Update = Update(context) }; }); }
public static Blob Create(Action<BlobFactoryContext> with) { return with.Apply(context => { return new Blob { Identifier = context.Identifier, GetHash = GetHash(context), GetSize = GetSize(context), GetFiles = GetFiles(context), DeployTo = DeployTo(context) }; }); }
public static JobTask Build(Action<JobTaskFactoryContext> with) { return with.Apply(context => { return new JobTask { Identifier = context.Execution.Identifier, Start = Start(context), Statistics = new JobTaskStatistics { Publish = PublishStatistics(context) } }; }); }