コード例 #1
0
        internal Fixture GetFixture(string innerHtml)
        {
            int href = innerHtml.IndexOf("a href=\"");
            string linkWithTrail = innerHtml.Substring(href + 8);
            int endHref = linkWithTrail.IndexOf("\"");
            string link = linkWithTrail.Substring(0, endHref);

            var doc = new HtmlDocument();
            doc.LoadHtml(ReadHtml(link));

            var fixture = new Fixture
            {
                Sport = GetSport(doc),
                Team = GetTeam(doc),
                School = GetOpponent(doc),
                Kickoff = GetKickoff(doc),
                HomeAway = GetHomeAway(doc),
                Venue = GetVenue(doc),
                Link = link
            };

            Logger.Debug("   {0}", fixture);

            fixture.Players.AddRange(GetPlayers(link));
            return fixture;
        }
コード例 #2
0
 public bool CanBeConsideredSameAs(Fixture other)
 {
     return (other.School == this.School)
            && (other.Kickoff.Value.Date == this.Kickoff.Value.Date)
            && (other.Team == this.Team)
            && (other.Sport == this.Sport);
 }