protected override MaintenanceTarget OnDeserializeTarget(System.Xml.XmlReader reader) { while (reader.Name != "target") reader.Read(); var target = new CoubTarget(reader["name"], reader["author"], reader["audioPath"], reader["videoPath"]); target.Description = reader["description"]; return target; }
public static Guid GetNewJob(Application app, CoubTarget target) { CoubJob job = new CoubJob(app); job.AddNew(); job.Targets.Add(target); job.Save(); return job.Id; }
private static void AddRecord(Record record, CoubTarget target, string tempFile) { record.AddNew(); record.Classifications.Add(new Adam.Core.Classifications.ClassificationPath("/Cubus/Coub")); record.Fields.GetField<TextField>("Name").SetValue(target.Name); record.Fields.GetField<TextField>("Author").SetValue(target.Author); record.Fields.GetField<TextField>("Description").SetValue(target.Description); record.Files.AddFile(tempFile); record.Save(); }