private static object GetCsvEntryByRequiredKey(string requiredKey, RuntimeCsvRepresentation rcr)
{
rcr.RemoveHeaderWhitespaceAndDetermineIfRequired();
int requiredIndex = rcr.GetRequiredIndex();
int startingRow;
int count;
GetStartingAndCount(rcr, requiredIndex, requiredKey, out startingRow, out count);
CsvEntry csvEntry = null;
if (startingRow != -1)
{
csvEntry = new CsvEntry();
csvEntry.RuntimeCsvRepresentation = rcr;
csvEntry.Count = count;
csvEntry.StartIndex = startingRow;
}
return csvEntry;
}