コード例 #1
0
        public Season Create2006Season()
        {
            DateTime seasonStartDate = new DateTime( 2006, 4, 3 );
            DateTime seasonEndDate = new DateTime( 2006, 10, 1 );

            DateTime postseasonStartDate = new DateTime( 2006, 10, 3 );
            DateTime postseasonEndDate = new DateTime( 2006, 10, 27 );

            DateTime AllStarGame = new DateTime( 2006, 7, 11 );

            PostSeason postseason = Add2006PostSeason( new PostSeason( postseasonStartDate, postseasonEndDate ) );

            Season season = new Season( seasonStartDate, seasonEndDate, postseason );
            season.AddException( AllStarGame );
            season.ShouldIncludePostSeason = true;

            season.AddExceptionGame( "gid_2006_04_02_clemlb_chamlb_1", new DateTime( 2006, 4, 2 ) );

            _dbcontext.InitializeSeason( 2006 );

            return season;
        }
コード例 #2
0
        public Season Create2014Season()
        {
            DateTime seasonStartDate = new DateTime( 2014, 3, 30 );
            DateTime seasonEndDate = new DateTime( 2014, 9, 28 );

            DateTime postseasonStartDate = new DateTime( 2014, 9, 30 );
            DateTime postseasonEndDate = new DateTime( 2014, 10, 29 );

            DateTime AllStarGame = new DateTime( 2014, 7, 15 );

            PostSeason postseason = Add2014PostSeason( new PostSeason( postseasonStartDate, postseasonEndDate ) );

            Season season = new Season( seasonStartDate, seasonEndDate, postseason );
            season.AddException( AllStarGame );
            season.ShouldIncludePostSeason = true;

            season.AddExceptionGame( "2014/03/22/lanmlb-arimlb-1", new DateTime( 2014, 3, 22 ) );
            season.AddExceptionGame( "2014/03/23/lanmlb-arimlb-1", new DateTime( 2014, 3, 23 ) );

            _dbcontext.InitializeSeason( 2014 );

            return season;
        }
コード例 #3
0
        public Season Add2012SeasonGameExceptions(Season season)
        {
            season.AddExceptionGame( "gid_2012_03_28_seamlb_oakmlb_1", new DateTime(2012, 3, 28) );
            season.AddExceptionGame( "gid_2012_03_29_seamlb_oakmlb_1", new DateTime( 2012, 3, 29 ) );
            season.AddExceptionGame( "gid_2012_04_04_slnmlb_flomlb_1", new DateTime( 2012, 4, 4 ) );

            return season;
        }