Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:StatusQuoBaseball.Base.Person"/> class.
        /// </summary>
        /// <param name="id">string</param>
        /// <param name="lName">string</param>
        /// <param name="fName">string</param>
        /// <param name="race">Race</param>
        /// <param name="handedness">Handedness</param>
        /// <param name="height">Height</param>
        /// <param name="weight">Weight</param>
        /// <param name="birthday">Birthday</param>
        protected Person(string id, string lName, string fName, Race race, Handedness handedness, Height height, Weight weight, Birthday birthday, Deathday deathDate) : base(id)
        {
            this.lastName        = lName;
            this.firstName       = fName;
            this.fullName        = String.Format($"{fName} {lName}");
            this.capitalizedName = this.fullName.ToUpper();
            this.race            = race;
            this.handedness      = handedness;
            this.height          = height;
            this.weight          = weight;
            this.birthday        = birthday;
            this.deathDate       = deathDate;
#pragma warning disable RECS0021 // Warns about calls to virtual member functions occuring in the constructor
            BuildToString();
#pragma warning restore RECS0021 // Warns about calls to virtual member functions occuring in the constructor
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:StatusQuoBaseball.Base.Coach"/> class.
        /// </summary>
        /// <param name="id">Identifier.</param>
        /// <param name="lName">string</param>
        /// <param name="fName">string</param>
        /// <param name="number">int</param>
        /// <param name="naturalPosition">string</param>
        /// <param name="race">Race</param>
        /// <param name="handedness">Handedness</param>
        /// <param name="bats">Bats</param>
        /// <param name="height">Height</param>
        /// <param name="weight">Weight</param>
        /// <param name="birthday">Birthday</param>
        /// <param name="awards">string[]</param>
        public Coach(string id, string lName, string fName, string number = "", string naturalPosition = "", Race race = Race.Unknown, Handedness handedness = Handedness.Unknown, Handedness bats = Handedness.Unknown, Height height = null, Weight weight = null, Birthday birthday = null, params string [] awards) : base(id, lName, fName, number, naturalPosition, race, handedness, bats, height, weight, birthday)
        {
            this.coachingAwards = awards;
#pragma warning disable RECS0021 // Warns about calls to virtual member functions occuring in the constructor
            BuildToString();
#pragma warning restore RECS0021 // Warns about calls to virtual member functions occuring in the constructor
        }