private List<string> textMarkerHandling(string row, char separator, char textmarker)
{
List<string> values = row.Split(separator).ToList();
/// <summary>
/// check if the row contains a textmarker
/// </summary>
/// <remarks></remarks>
if (row.Contains(textmarker))
{
string tempValue = "";
bool startText = false;
List<string> temp = new List<string>();
foreach (string v in values)
{
/// <summary>
/// check if the value v contains a textmarker
/// and generate a new string which include all values between
/// the first Text marker and the last TextMarker
/// </summar>
/// <remarks></remarks>
if (v.Contains(textmarker))
{
if (v.ToCharArray().First().Equals(textmarker))
{
tempValue = v;
startText = true;
}
if (v.ToCharArray().Last().Equals(textmarker))
{
tempValue += separator+v;
temp.Add(tempValue.Trim(textmarker));
startText = false;
}
}
else
{
if (startText)
tempValue += separator + v;
else temp.Add(v);
}
}
return temp;
}
return values;
}