C# Класс BF2Statistics.MedalData.MedalDataParser

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BuildAwardCache ( MatchCollection MedalsMatches, MatchCollection RanksMatches ) : void

This method builds the award cache with the given data from the medal data file. This method WILL CLEAR the award cache from any existing medals

LoadMedalDataFile ( string FilePath ) : void

This method loads a Medal data python file, and parses it. The medal data is stored in the AwardCache object

ParseMedalData ( string Data, MatchCollection &MedalsMatches, MatchCollection &RanksMatches ) : void

This method takes a medal data string, and parses it. The parsed match collections are passed back out from referenced variables

ParseNodeConditions ( TreeNode Node ) : Condition

Takes a node tree and converts it to a Condition

ReadPythonFile ( string file ) : string

Simple easy way to get the contents of a file, excluding empty lines.

Приватные методы

Метод Описание
MedalDataParser ( ) : System

Loads the default medal data into the Award Cache

ParseCondition ( List parts, int &i ) : Condition

Parses a string condition into condition objects

ParseCondition ( string ConditionString ) : Condition

Parses a string condition into condition objects

ParseFunctions ( List &parts ) : bool

Takes each literal token, and determines if its a StatFunction, or ConditionFunction

Tokenize ( TokenType tokenKind, string pattern, int>.KeyValuePair &untokenizedParts ) : IEnumerable

Performs tokenization of a collection of non-tokenized data parts with a specific pattern

Tokenize ( string source ) : IEnumerable

Breaks an input string into recognizable tokens

Описание методов

BuildAwardCache() публичный статический Метод

This method builds the award cache with the given data from the medal data file. This method WILL CLEAR the award cache from any existing medals
public static BuildAwardCache ( MatchCollection MedalsMatches, MatchCollection RanksMatches ) : void
MedalsMatches System.Text.RegularExpressions.MatchCollection
RanksMatches System.Text.RegularExpressions.MatchCollection
Результат void

LoadMedalDataFile() публичный статический Метод

This method loads a Medal data python file, and parses it. The medal data is stored in the AwardCache object
public static LoadMedalDataFile ( string FilePath ) : void
FilePath string The full file path to the python file
Результат void

ParseMedalData() публичный статический Метод

This method takes a medal data string, and parses it. The parsed match collections are passed back out from referenced variables
public static ParseMedalData ( string Data, MatchCollection &MedalsMatches, MatchCollection &RanksMatches ) : void
Data string The contents of the medal data file
MedalsMatches System.Text.RegularExpressions.MatchCollection
RanksMatches System.Text.RegularExpressions.MatchCollection
Результат void

ParseNodeConditions() публичный статический Метод

Takes a node tree and converts it to a Condition
public static ParseNodeConditions ( TreeNode Node ) : Condition
Node System.Windows.Forms.TreeNode
Результат Condition

ReadPythonFile() публичный статический Метод

Simple easy way to get the contents of a file, excluding empty lines.
public static ReadPythonFile ( string file ) : string
file string
Результат string