private void ReadRecordProperties(BcsFileRecord record, Func<BcsFileRecord, string, string, bool> propertyProcessingFunc )
{
while (!reader.EndOfStream && !currentLine.IsEmptyOrWhitespace())
{
var propertySeparatorIndex = currentLine.IndexOf(':');
if (propertySeparatorIndex < 0)
{
record.MalformedLines.Add(currentLine);
}
else
{
string name = currentLine.Substring(0, propertySeparatorIndex).RemoveAllWhitespaces();
string value = string.Empty;
if (propertySeparatorIndex + 1 < currentLine.Length)
{
value = currentLine.Substring(propertySeparatorIndex+1).Trim();
}
if(!propertyProcessingFunc(record, name, value) && !AssignCommonRecordProperties(name, value, record) )
{
record.MalformedLines.Add(currentLine);
}
}
NextLine();
}
}