private static async Task DotCoverToCobertura(CoberturaConverterOptions options) { using (var inputStream = File.OpenRead(options.InputFilePath)) { using (var coberturaStream = ConvertDotCoverToCobertura(inputStream)) { using (var outputStream = File.Create(options.OutputFilePath)) { await coberturaStream.CopyToAsync(outputStream); } } } }
private static Task PerformConversion(CoberturaConverterOptions options) { switch (options.Target) { case SourceReportFormat.DotCover: return(DotCoverToCobertura(options)); case SourceReportFormat.OpenCover: return(OpenCoverToCobertura(options)); default: throw new NotImplementedException("The specified source report format is not currently implemented"); } }