Restructure LotteryTableRow
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
using HtmlAgilityPack;
|
using HtmlAgilityPack;
|
||||||
using lottery_co_uk_scraper.core.Models;
|
using lottery_co_uk_scraper.core.Models;
|
||||||
using static lottery_co_uk_scraper.NationalLottery.Lotto;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using lottery_co_uk_scraper.Utilities;
|
using lottery_co_uk_scraper.Utilities;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -9,6 +8,25 @@ namespace lottery_co_uk_scraper.NationalLottery
|
|||||||
{
|
{
|
||||||
internal partial class DrawWinnerInformation
|
internal partial class DrawWinnerInformation
|
||||||
{
|
{
|
||||||
|
[GeneratedRegex(@"(\d+)")]
|
||||||
|
private static partial Regex MyRegex();
|
||||||
|
|
||||||
|
internal static class LotteryTableRow
|
||||||
|
{
|
||||||
|
internal const string Match2 = "Match 2";
|
||||||
|
internal const string Match3 = "Match 3";
|
||||||
|
internal const string Match4 = "Match 4";
|
||||||
|
internal const string Match5 = "Match 5";
|
||||||
|
internal const string Match5Bonus = "Match 5 plus Bonus";
|
||||||
|
internal const string Match6 = "Match 6";
|
||||||
|
internal const string Total = "Totals";
|
||||||
|
internal const string Winners = "Winners";
|
||||||
|
internal const string PrizePerWinner = "Prize Per Winner";
|
||||||
|
internal const string PrizeFundAmount = "Prize Fund Amount";
|
||||||
|
internal const string BallSetUsed = "ballSetUsed";
|
||||||
|
internal const string BallsDrawn = "ballsDrawn";
|
||||||
|
}
|
||||||
|
|
||||||
public static void ProcessTableSection(HtmlNode table, string sectionTitle, LottoResult lottoResult)
|
public static void ProcessTableSection(HtmlNode table, string sectionTitle, LottoResult lottoResult)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -51,6 +69,7 @@ namespace lottery_co_uk_scraper.NationalLottery
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HtmlNode GetSectionRowByTitle(HtmlNode table, string sectionTitle)
|
private static HtmlNode GetSectionRowByTitle(HtmlNode table, string sectionTitle)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -544,8 +563,5 @@ namespace lottery_co_uk_scraper.NationalLottery
|
|||||||
{
|
{
|
||||||
AssignValueToModelProperty(sectionTitle, columnTitle, LotteryTableRow.Total, winnersNode, lottoResult);
|
AssignValueToModelProperty(sectionTitle, columnTitle, LotteryTableRow.Total, winnersNode, lottoResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedRegex(@"(\d+)")]
|
|
||||||
private static partial Regex MyRegex();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,21 +37,5 @@ namespace lottery_co_uk_scraper.NationalLottery
|
|||||||
Console.WriteLine($"An error occurred: {ex.Message}");
|
Console.WriteLine($"An error occurred: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class LotteryTableRow
|
|
||||||
{
|
|
||||||
public const string Match2 = "Match 2";
|
|
||||||
public const string Match3 = "Match 3";
|
|
||||||
public const string Match4 = "Match 4";
|
|
||||||
public const string Match5 = "Match 5";
|
|
||||||
public const string Match5Bonus = "Match 5 plus Bonus";
|
|
||||||
public const string Match6 = "Match 6";
|
|
||||||
public const string Total = "Totals";
|
|
||||||
public const string Winners = "Winners";
|
|
||||||
public const string PrizePerWinner = "Prize Per Winner";
|
|
||||||
public const string PrizeFundAmount = "Prize Fund Amount";
|
|
||||||
public const string BallSetUsed = "ballSetUsed";
|
|
||||||
public const string BallsDrawn= "ballsDrawn";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user