public static string[] GetFieldText ( [NotNull] this RecordFieldCollection fields ) { int count = fields.Count; LocalList <string> result = new LocalList <string>(); for (int i = 0; i < count; i++) { string text = fields[i].Text; if (!string.IsNullOrEmpty(text)) { result.Add(text); } } return(result.ToArray()); }
public static RecordField[] GetField ( [NotNull] this RecordFieldCollection fields, params string[] tags ) { int count = fields.Count; LocalList <RecordField> result = new LocalList <RecordField>(); for (int i = 0; i < count; i++) { if (fields[i].Tag.OneOf(tags)) { result.Add(fields[i]); } } return(result.ToArray()); }
public static RecordField[] GetField ( [NotNull] this RecordFieldCollection fields, [NotNull] string tag ) { LocalList <RecordField> result = new LocalList <RecordField>(); int count = fields.Count; for (int i = 0; i < count; i++) { if (fields[i].Tag.SameString(tag)) { result.Add(fields[i]); } } return(result.ToArray()); }
public static RecordField GetField ( [NotNull] this RecordFieldCollection fields, [NotNull] string tag, int occurrence ) { int count = fields.Count; for (int i = 0; i < count; i++) { if (fields[i].Tag.SameString(tag)) { if (occurrence == 0) { return(fields[i]); } occurrence--; } } return(null); }