コード例 #1
0
ファイル: Pitcher.cs プロジェクト: Boltzenberg/FantasySports
        public static Pitcher Create(ESPNProjections.Pitcher pitcher)
        {
            Pitcher p = new Pitcher();

            p.AuctionPrice = 0;
            p.FantasyTeam  = string.Empty;
            p.Update(pitcher);
            return(p);
        }
コード例 #2
0
ファイル: Pitcher.cs プロジェクト: Boltzenberg/FantasySports
 public void Update(ESPNProjections.Pitcher pitcher)
 {
     this.Name = pitcher.FullName;
     this.IsSP = pitcher.Positions.Contains(ESPNProjections.Constants.Positions.SP);
     this.IsRP = pitcher.Positions.Contains(ESPNProjections.Constants.Positions.RP);
     this.ProjectedOutsRecorded = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.OutsRecorded], 0);
     this.ProjectedW            = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.W], 0);
     this.ProjectedSV           = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.SV], 0);
     this.ProjectedK            = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.K], 0);
     this.ProjectedHits         = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.H], 0);
     this.ProjectedWalks        = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.BB], 0);
     this.ProjectedER           = GetStat(pitcher.Stats[ESPNProjections.Constants.Stats.Pitchers.ER], 0);
     this.ProjectedIP           = pitcher.InningsPitched;
     this.ProjectedERA          = pitcher.ERA;
     this.ProjectedWHIP         = pitcher.WHIP;
     this.SeasonOutlook         = pitcher.SeasonOutlook;
 }