private Participant GetParticipant(string filePath) { var fileName = _fileHelper.GetFileName(filePath); var guestsName = fileName.Substring( fileName.IndexOf("-", StringComparison.InvariantCultureIgnoreCase) + 1, fileName.IndexOf("-on-", StringComparison.InvariantCultureIgnoreCase) - (fileName.IndexOf("-", StringComparison.InvariantCultureIgnoreCase) + 1)); var charToSplitOn = '-'; return(NameParser.ParseParticipantName(guestsName, charToSplitOn)); }