BatchGuy.App.Parser.Services.BluRayTitleLineItemIdentifierService.GetLineItemType C# (CSharp) Метод

GetLineItemType() публичный Метод

public GetLineItemType ( ProcessOutputLineItem processOutputLineItem ) : EnumBluRayLineItemType
processOutputLineItem BatchGuy.App.Parser.Models.ProcessOutputLineItem
Результат EnumBluRayLineItemType
        public EnumBluRayLineItemType GetLineItemType(ProcessOutputLineItem processOutputLineItem)
        {
            EnumBluRayLineItemType type;

            if (this.IsHeaderLine(processOutputLineItem))
            {
                type = EnumBluRayLineItemType.BluRayTitleHeaderLine;
            }
            else if (this.IsChapterLine(processOutputLineItem))
            {
                type = EnumBluRayLineItemType.BluRayTitleChapterLine;
            }
            else if (this.IsVideoLine(processOutputLineItem))
            {
                type = EnumBluRayLineItemType.BluRayTitleVideoLine;
            }
            else if (this.IsAudioLine(processOutputLineItem))
            {
                type = EnumBluRayLineItemType.BluRayTitleAudioLine;
            }
            else if (this.IsSubtitleLine(processOutputLineItem))
            {
                type = EnumBluRayLineItemType.BluRayTitleSubtitleLine;
            }
            else
            {
                type = EnumBluRayLineItemType.BluRayTitleEmptyLine;
            }
            return type;
        }

Usage Example

 public void bluraytitlelineitemidentifierservice_can_identify_bluray_video_line_item_test()
 {
     ProcessOutputLineItem lineItem = new ProcessOutputLineItem() { Id = 1, Text = "2: h264/AVC, 1080i50 (16:9)" };
     ILineItemIdentifierService service = new BluRayTitleLineItemIdentifierService();
     EnumBluRayLineItemType type = service.GetLineItemType(lineItem);
     type.Should().Be(EnumBluRayLineItemType.BluRayTitleVideoLine);
 }
All Usage Examples Of BatchGuy.App.Parser.Services.BluRayTitleLineItemIdentifierService::GetLineItemType