public static int GetGameDataCount <T>(EnConfig enConfig) where T : GameData { if (enConfig < 0 || enConfig >= EnConfig.Count || gameDataList[(int)enConfig] == null) { return(0); } return(gameDataList[(int)enConfig].DataCount); }
public static int GetGameDataMaxKey(EnConfig enConfig, int firstKey) { if (enConfig < 0 || enConfig >= EnConfig.Count || gameDataList[(int)enConfig] == null) { return(0); } return(gameDataList[(int)enConfig].GetGameDataMaxKey(firstKey)); }
public static T GetGameData <T>(EnConfig enConfig, string ID) where T : GameData { if (enConfig < 0 || enConfig >= EnConfig.Count || gameDataList[(int)enConfig] == null) { return(null); } return(gameDataList[(int)enConfig].GetGameData <T>(ID)); }
public GameDataStore(EnConfig configType, short keyType, List <GameData> dataList) { this.configType = configType; this.keyType = (EnConfigKeyType)keyType; DataList = dataList; DataCount = dataList.Count; maxIDValue = 0; maxIDValueDic = new Dictionary <int, int>(); InitDic(); }
public string HighlightHtmlEuroCases(string htmlText, string searchText, int langIdOfDoc) { ApisLucene.Classes.Eucases.Highlight.Config.IConfig config = null; ApisLucene.Classes.Eucases.Stemming.IStemmer stemmer = null; switch (langIdOfDoc) { case 1: config = new BgConfig(); stemmer = new BgStemmer(); break; case 2: config = new DeConfig(); stemmer = new DeStemmer(); break; case 3: config = new FrConfig(); stemmer = new FrStemmer(); break; case 4: config = new EnConfig(); stemmer = new EnStemmer(); break; default: config = new EnConfig(); stemmer = new EnStemmer(); break; } var highlightPositions = this.GetHighlightPositions(htmlText, config, stemmer, searchText, false); string heighlightedHtml = this.AppendHighlights(htmlText, highlightPositions); return(heighlightedHtml); }