GetShowProgressNumbersPart() public méthode

public GetShowProgressNumbersPart ( ) : string
Résultat string
        public ErrorCollection Write()
        {
            if (this.IsValid())
            {
                try
                {
                    this.Delete();

                    foreach (BluRayDiscInfo disc in _bluRayDiscInfoList.Where(d => d.IsSelected))
                    {
                        foreach (BluRaySummaryInfo summary in disc.BluRaySummaryInfoList.Where(s => s.IsSelected).OrderBy(s => s.EpisodeNumber))
                        {
                            IEAC3ToOutputService eacOutputService = new EAC3ToOutputService(_eac3toConfiguration, _eac3ToOutputNamingService, disc.BluRayPath, summary);
                            string eac3ToPathPart          = eacOutputService.GetEAC3ToPathPart();
                            string bluRayStreamPart        = eacOutputService.GetBluRayStreamPart();
                            string chapterStreamPart       = eacOutputService.GetChapterStreamPart();
                            string videoStreamPart         = eacOutputService.GetVideoStreamPart();
                            string audioStreamPart         = eacOutputService.GetAudioStreamPart();
                            string subtitleStreamPart      = eacOutputService.GetSubtitleStreamPart();
                            string logPart                 = eacOutputService.GetLogPart();
                            string showProgressNumbersPart = eacOutputService.GetShowProgressNumbersPart();

                            using (StreamWriter sw = new StreamWriter(_eac3toConfiguration.BatchFilePath, true))
                            {
                                sw.WriteLine(string.Format("{0} {1} {2} {3} {4} {5} {6} {7}", eac3ToPathPart, bluRayStreamPart, chapterStreamPart, videoStreamPart, audioStreamPart,
                                                           subtitleStreamPart, logPart, showProgressNumbersPart));
                                sw.WriteLine();
                                sw.WriteLine();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    _log.ErrorFormat(Program.GetLogErrorFormat(), ex.Message, ex.StackTrace, MethodBase.GetCurrentMethod().Name);
                    _errors.Add(new Error()
                    {
                        Description = "There was an error while creating the eac3to batch file."
                    });
                }
            }
            return(_errors);
        }
        public ErrorCollection Write()
        {
            if (this.IsValid())
            {
                try
                {
                    this.Delete();

                    foreach (BluRayDiscInfo disc in _bluRayDiscInfoList.Where(d => d.IsSelected))
                    {
                        foreach (BluRaySummaryInfo summary in disc.BluRaySummaryInfoList.Where(s => s.IsSelected).OrderBy(s => s.EpisodeNumber))
                        {
                            IEAC3ToOutputService eacOutputService = new EAC3ToOutputService(_eac3toConfiguration, _eac3ToOutputNamingService, disc.BluRayPath, summary);
                            string eac3ToPathPart = eacOutputService.GetEAC3ToPathPart();
                            string bluRayStreamPart = eacOutputService.GetBluRayStreamPart();
                            string chapterStreamPart = eacOutputService.GetChapterStreamPart();
                            string videoStreamPart = eacOutputService.GetVideoStreamPart();
                            string audioStreamPart = eacOutputService.GetAudioStreamPart();
                            string subtitleStreamPart = eacOutputService.GetSubtitleStreamPart();
                            string logPart = eacOutputService.GetLogPart();
                            string showProgressNumbersPart = eacOutputService.GetShowProgressNumbersPart();

                            using (StreamWriter sw = new StreamWriter(_eac3toConfiguration.BatchFilePath, true))
                            {
                                sw.WriteLine(string.Format("{0} {1} {2} {3} {4} {5} {6} {7}", eac3ToPathPart, bluRayStreamPart, chapterStreamPart, videoStreamPart, audioStreamPart,
                                    subtitleStreamPart, logPart, showProgressNumbersPart));
                                sw.WriteLine();
                                sw.WriteLine();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    _log.ErrorFormat(Program.GetLogErrorFormat(), ex.Message, ex.StackTrace, MethodBase.GetCurrentMethod().Name);
                    _errors.Add(new Error() { Description = "There was an error while creating the eac3to batch file." });
                }
            }
            return _errors;
        }
 public void eacoutputservice_can_set_progress_numbers_true_settings_test()
 {
     //given
     EAC3ToConfiguration config = new EAC3ToConfiguration() { BatchFilePath = "c:\\temp", ShowProgressNumbers = true };
     BluRaySummaryInfo summaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1", AudioList = new List<BluRayTitleAudio>() { new BluRayTitleAudio() { Id = "3:", AudioType = EnumAudioType.DTSEXPRESS, IsSelected = true, Arguments = "-core" } } } };
     string bluRayPath = "c:\\disc";
     IAudioService audioService = new AudioService();
     AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService);
     //when
     IEAC3ToOutputService service = new EAC3ToOutputService(config, eac3ToOutputNamingService, bluRayPath, summaryInfo);
     //then
     string output = service.GetShowProgressNumbersPart();
     output.Should().Contain("-progressnumbers");
 }