BatchGuy.App.Eac3to.Services.EAC3ToOutputService.GetVideoStreamPart C# (CSharp) Méthode

GetVideoStreamPart() public méthode

public GetVideoStreamPart ( ) : string
Résultat string
        public string GetVideoStreamPart()
        {
            StringBuilder sb = new StringBuilder();
            if (_bluRaySummaryInfo.BluRayTitleInfo.Video != null)
            {
                if (_bluRaySummaryInfo.BluRayTitleInfo.Video.IsSelected)
                {
                    sb.Append(string.Format("{0} ", _bluRaySummaryInfo.BluRayTitleInfo.Video.Id));
                    sb.Append(_eac3ToOutputNamingService.GetVideoName(_eac3ToConfiguration, _filesOutputPath, _paddedEpisodeNumber, _bluRaySummaryInfo.BluRayTitleInfo.EpisodeName));
                }
            }
            return sb.ToString();
        }

Usage Example

        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);
        }
All Usage Examples Of BatchGuy.App.Eac3to.Services.EAC3ToOutputService::GetVideoStreamPart