public BulkUpdateContents ToCommand() { var result = SimpleMapper.Map(this, new BulkUpdateContents()); result.Jobs = Datas?.Select(x => new BulkUpdateJob { Type = BulkUpdateContentType.Create, Data = x }).ToArray(); if (result.Jobs != null && Publish) { foreach (var job in result.Jobs) { if (job != null) { job.Status = Status.Published; } } } return(result); }
public BulkUpdateContents ToCommand() { var result = SimpleMapper.Map(this, new BulkUpdateContents()); result.Jobs = Datas?.Select(x => new BulkUpdateJob { Type = BulkUpdateContentType.Create, Data = x }).ToArray(); #pragma warning disable CS0618 // Type or member is obsolete if (result.Jobs != null && Publish) { foreach (var job in result.Jobs) { if (job != null) { job.Status = Status.Published; } } } #pragma warning restore CS0618 // Type or member is obsolete return(result); }