C# Class ElectionsMandateCalculator.Helpers.InputParsers

Exibir arquivo Open project: elections-contest/pe2013

Public Methods

Method Description
ParseCandidateFromString ( string recordLine ) : Candidate

Parsing line from Candidates.txt ex: Mir/Party/Sequence num/name 1;1;1;“Кандидат 1 в МИР 1 – Партия 1“ 1;1;2;“Кандидат 2 в МИР 1 – Партия 1“

ParseCandidatesListFromFile ( string fileName ) : List
ParseCandidatesListFromFileContent ( string fileContent ) : List
ParseLotsListFromFile ( string fileName ) : List
ParseMirFromString ( string recordLine ) : Mir

Parse Mir from Mirs.txt ex: 1;“МИР 1“;10 2;“МИР 2“;5 3;“Чужбина“;0

ParseMirsListFromFile ( string fileName ) : List
ParseMirsListFromFileContent ( string fileContent ) : List
ParsePartiesListFromFile ( string fileName ) : List
ParsePartiesListFromFileContent ( string fileContent ) : List
ParsePartyFromString ( string recordLine ) : Party

Parse Parties from Parties.txt ex: 1;“Партия 1“ 2;“Коалиция 1“ 1000;“Инициативен комитет в МИР 1“ 1001;“Инициативен комитет в МИР 2“

ParseResultFromString ( string recordLine ) : Result

Parse result from sample result file 6;3;3 6;4;1

ParseResultsListFromFile ( string fileName ) : List
ParseResultsListFromFileContent ( string fileContent ) : List
ParseVoteFromString ( string recordLine ) : Vote

Parse Vote from Votes.txt ex: 1;1;1000 1;2;500 1;1000;600

ParseVotesListFromFile ( string fileName ) : List
ParseVotesListFromFileContent ( string fileContent ) : List

Method Details

ParseCandidateFromString() public static method

Parsing line from Candidates.txt ex: Mir/Party/Sequence num/name 1;1;1;“Кандидат 1 в МИР 1 – Партия 1“ 1;1;2;“Кандидат 2 в МИР 1 – Партия 1“
public static ParseCandidateFromString ( string recordLine ) : Candidate
recordLine string
return ElectionsMandateCalculator.Models.Candidate

ParseCandidatesListFromFile() public static method

public static ParseCandidatesListFromFile ( string fileName ) : List
fileName string
return List

ParseCandidatesListFromFileContent() public static method

public static ParseCandidatesListFromFileContent ( string fileContent ) : List
fileContent string
return List

ParseLotsListFromFile() public static method

public static ParseLotsListFromFile ( string fileName ) : List
fileName string
return List

ParseMirFromString() public static method

Parse Mir from Mirs.txt ex: 1;“МИР 1“;10 2;“МИР 2“;5 3;“Чужбина“;0
public static ParseMirFromString ( string recordLine ) : Mir
recordLine string
return ElectionsMandateCalculator.Models.Mir

ParseMirsListFromFile() public static method

public static ParseMirsListFromFile ( string fileName ) : List
fileName string
return List

ParseMirsListFromFileContent() public static method

public static ParseMirsListFromFileContent ( string fileContent ) : List
fileContent string
return List

ParsePartiesListFromFile() public static method

public static ParsePartiesListFromFile ( string fileName ) : List
fileName string
return List

ParsePartiesListFromFileContent() public static method

public static ParsePartiesListFromFileContent ( string fileContent ) : List
fileContent string
return List

ParsePartyFromString() public static method

Parse Parties from Parties.txt ex: 1;“Партия 1“ 2;“Коалиция 1“ 1000;“Инициативен комитет в МИР 1“ 1001;“Инициативен комитет в МИР 2“
public static ParsePartyFromString ( string recordLine ) : Party
recordLine string
return ElectionsMandateCalculator.Models.Party

ParseResultFromString() public static method

Parse result from sample result file 6;3;3 6;4;1
public static ParseResultFromString ( string recordLine ) : Result
recordLine string
return Result

ParseResultsListFromFile() public static method

public static ParseResultsListFromFile ( string fileName ) : List
fileName string
return List

ParseResultsListFromFileContent() public static method

public static ParseResultsListFromFileContent ( string fileContent ) : List
fileContent string
return List

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

ParseVotesListFromFile() public static method

public static ParseVotesListFromFile ( string fileName ) : List
fileName string
return List

ParseVotesListFromFileContent() public static method

public static ParseVotesListFromFileContent ( string fileContent ) : List
fileContent string
return List