public static string PickChoiceToString(PickChoice choice) { if (choice == PickChoice.Home) { return("H"); } if (choice == PickChoice.Draw) { return("D"); } if (choice == PickChoice.Away) { return("A"); } if (choice == PickChoice.HomeOrDraw) { return("H D"); } if (choice == PickChoice.HomeOrAway) { return("H A"); } if (choice == PickChoice.DrawOrAway) { return("D A"); } if (choice == PickChoice.Over) { return("Over"); } if (choice == PickChoice.Under) { return("Under"); } if (choice == PickChoice.HomeAsianHandicapAdd) { return("H +"); } if (choice == PickChoice.AwayAsianHandicapAdd) { return("A +"); } if (choice == PickChoice.HomeAsianHandicapSubtract) { return("H -"); } if (choice == PickChoice.AwayAsianHandicapSubtract) { return("A -"); } if (choice == PickChoice.BothToScore) { return("BTTS"); } if (choice == PickChoice.Other) { return("(Inny)"); } return("(Nieobsługiwany typ)"); }
public override int GetHashCode() { return(Date.GetHashCode() ^ 7 * Discipline.GetHashCode() ^ 11 * LeagueName.GetHashCode() ^ 17 * MatchHomeName.GetHashCode() ^ 19 * MatchAwayName.GetHashCode() ^ 23 * PickChoice.GetHashCode() ^ 29 * PickValue.GetHashCode() ^ 31); }
public static string PickToString(PickChoice choice, double?value) { var sb = new StringBuilder(); sb.Append(PickChoiceToString(choice)); if (choice == PickChoice.BothToScore) { sb.Append(value.ToBool() ? " - Y" : " - N"); } else if (value != null) { if (!sb.ToString().EndsWithAny(ArrayUtils.Operators)) { sb.Append(" "); } sb.Append($"{value}"); } return(sb.ToString()); }
public override string ToString() { return($"[{Date.Rfc1123:dd-MM-yyyy HH:mm}] {MatchHomeName} - {MatchAwayName}: {PickChoice.EnumToString()} {PickValue:0.##} (s: {Stake:0.00})"); }
public PickResponse(string pickOriginalString, PickChoice choice, double?value) { PickOriginalString = pickOriginalString; Choice = choice; Value = value; }
public DbPick(int id, PickChoice choice, double?value) { Id = id; Choice = choice; Value = value; }