/// <summary> /// Initializes a new instance of the <see cref="PlayerBoxScore" /> class. /// </summary> /// <param name="dict">The dictionary containing the player box score.</param> /// <param name="playerID">The player ID.</param> /// <param name="teamID">The team.</param> /// <param name="playerName">The player's name.</param> public PlayerBoxScore(Dictionary <string, string> dict, int playerID, int teamID, string playerName = "") { PlayerID = playerID; Name = playerName; TeamID = teamID; IsStarter = IsStarter.TrySetValue(dict, "Starter", typeof(bool)); PlayedInjured = PlayedInjured.TrySetValue(dict, "Injured", typeof(bool)); IsOut = IsOut.TrySetValue(dict, "DNP", typeof(bool)); MINS = MINS.TrySetValue(dict, "MINS", typeof(UInt16)); PTS = PTS.TrySetValue(dict, "PTS", typeof(UInt16)); REB = REB.TrySetValue(dict, "REB", typeof(UInt16)); AST = AST.TrySetValue(dict, "AST", typeof(UInt16)); STL = STL.TrySetValue(dict, "STL", typeof(UInt16)); BLK = BLK.TrySetValue(dict, "BLK", typeof(UInt16)); TOS = TOS.TrySetValue(dict, "TO", typeof(UInt16)); FGM = FGM.TrySetValue(dict, "FGM", typeof(UInt16)); FGA = FGA.TrySetValue(dict, "FGA", typeof(UInt16)); TPM = TPM.TrySetValue(dict, "3PM", typeof(UInt16)); TPA = TPA.TrySetValue(dict, "3PA", typeof(UInt16)); FTM = FTM.TrySetValue(dict, "FTM", typeof(UInt16)); FTA = FTA.TrySetValue(dict, "FTA", typeof(UInt16)); OREB = OREB.TrySetValue(dict, "OREB", typeof(UInt16)); FOUL = FOUL.TrySetValue(dict, "FOUL", typeof(UInt16)); }