Exemplo n.º 1
0
 private static RewardData ParseRewardOrNull(string str)
 {
     if (string.IsNullOrEmpty(str))
     {
         return(null);
     }
     return(RewardParser.ParseReward(str));
 }
Exemplo n.º 2
0
    public static List <WeightedObject <RewardData> > ParseGiftRewards(string text)
    {
        IEnumerable <string[]> source = TSVParser.Parse(text).Skip(1);

        return((from line in source
                select new WeightedObject <RewardData>
        {
            Value = RewardParser.ParseReward(line[0]),
            Weight = line.asInt(1, line.toError <int>())
        }).ToList());
    }