Created
November 10, 2016 22:29
-
-
Save rofr/9790c092fb0975548d0c3e0301ca5888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TextLiteral | |
{ | |
[EdifactElement(0)] | |
public string Line0 { get; set; } | |
[EdifactElement(1, required: false)] | |
public string Line1 { get; set; } | |
[EdifactElement(2, required: false)] | |
public string Line2 { get; set; } | |
[EdifactElement(3, required: false)] | |
public string Line3 { get; set; } | |
[EdifactElement(4, required: false)] | |
public string Line4 { get; set; } | |
public IEnumerable<string> Lines | |
{ | |
get | |
{ | |
yield return Line0; | |
if (Line1 != null) yield return Line1; | |
if (Line2 != null) yield return Line2; | |
if (Line3 != null) yield return Line3; | |
if (Line4 != null) yield return Line4; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment