public static void RunExtractCloudConnectionDataJob(this IBirstAdminService adminService, string spaceId, IEnumerable <CloudConnection> connections) { var job = new BirstJob(svc => svc.ExtractCloudConnectorData(spaceId, connections), adminService); job.RunToCompletion(); }
public static void RunPublishDataJob(this IBirstAdminService adminService, string spaceId, IEnumerable <string> processingGroups) { var job = new BirstJob(svc => svc.PublishData(spaceId, processingGroups), adminService); job.RunToCompletion(); }
/// <summary> /// Initializes a new instance of the <see cref="BirstJob"/> class. /// </summary> /// <param name="startJob">The start job.</param> /// <param name="adminService">The admin service.</param> /// <exception cref="ArgumentNullException"> /// startJob /// or /// adminService /// </exception> public BirstJob(Func <IBirstAdminService, string> startJob, IBirstAdminService adminService) { if (startJob == null) { throw new ArgumentNullException(nameof(startJob)); } if (adminService == null) { throw new ArgumentNullException(nameof(adminService)); } _startJob = startJob; _adminService = adminService; }