Beispiel #1
0
 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);
             }
         }
     }
 }
Beispiel #2
0
        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");
            }
        }