public static async Task <Launch> SmartMergeLaunchesAsync( this ICakeContext context, Service service, FilterOption filter, CleanOptions cleanOptions, MergeOptions mergeOptions = null, bool debug = true) { var cleaner = new ForciblyTerminatingLaunchCleaner( new LaunchCleaner(service, cleanOptions), service); var decoratedMerger = new CleanableLaunchMerger(new LaunchMerger(service, mergeOptions), cleaner); var merger = new ForciblyTerminatingLaunchMerger(decoratedMerger, service); var launch = await new SmartLaunchMerger(merger, service, debug) .MergeAsync(filter) .ConfigureAwait(false); var message = $"Smart merging launches successfully completed."; context.Log.Write(Verbosity.Diagnostic, LogLevel.Debug, message); return(launch); }
public static async Task <Launch> MergeLaunchesWithCleaningAsync( this ICakeContext context, Service service, Launch cleanable, Launch notCleanable, CleanOptions cleanOptions, MergeOptions mergeOptions = null) { var cleaner = new ForciblyTerminatingLaunchCleaner( new LaunchCleaner(service, cleanOptions), service); var launch = await new CleanableLaunchMerger(new LaunchMerger(service, mergeOptions), cleaner) .MergeAsync(cleanable, notCleanable) .ConfigureAwait(false); var message = $"Merging launches with cleaning with id = {cleanable.Id} and id = {notCleanable.Id} successfully completed"; context.Log.Write(Verbosity.Diagnostic, LogLevel.Debug, message); return(launch); }