ElectionsMandateCalculator.Helpers.InputParsers.ParseVoteFromString C# (CSharp) Method

ParseVoteFromString() public static method

Parse Vote from Votes.txt ex: 1;1;1000 1;2;500 1;1000;600
public static ParseVoteFromString ( string recordLine ) : Vote
recordLine string
return ElectionsMandateCalculator.Models.Vote
        public static Vote ParseVoteFromString(string recordLine)
        {
            if (string.IsNullOrEmpty(recordLine))
            {
                throw new ArgumentNullException();
            }

            var propValues = recordLine.Split(SEPARATOR);

            var item = new Vote(
                                mirId: int.Parse(propValues[0]),
                                partyId: int.Parse(propValues[1]),
                                count: int.Parse(propValues[2])
                           );

            return item;
        }