/// <summary> /// Creates a complete instance of a Team with according parameters /// </summary> /// <param name="id">Id of the Team</param> /// <param name="dateCreation">Date of creation of the instance</param> /// <param name="name">Name of the Team</param> /// <param name="description">Description of the Team</param> /// <param name="race">Race of the Team</param> /// <param name="money">Money of the Team</param> /// <param name="players">Players of the Team</param> /// <param name="coach">Coach of the Team</param> public Team(Guid id, DateTime dateCreation, string name, string description, Race race, int money, List <Player> players, Coach coach) { this.id = id; this.dateCreation = dateCreation; this.name = name; this.description = description; this.race = race; this.money = money; this.players = players; this.coach = coach; }
/// <summary> /// Creates a complete instance of a CoachWithPassword with a father Coach instance /// </summary> /// <param name="coach">Coach this instance is taking form of</param> /// <param name="credentials">Credentials of the CoachWithPassword</param> public CoachWithPassword(Coach coach, Credentials credentials) : base(coach.id, coach.name, coach.email, coach.teams) { this.password = credentials.password; }
/// <summary> /// Creates a complete instance of a CoachWithPassword with a father Coach instance /// </summary> /// <param name="coach">Coach this instance is taking form of</param> public CoachWithPassword(Coach coach) : base(coach.id, coach.name, coach.email, coach.teams) { password = String.Empty; }
/// <summary> /// Creates a complete instance of a CoachWithPassword with a father Coach instance /// </summary> /// <param name="coach">Coach this instance is taking form of</param> /// <param name="password">Password of the CoachWithPassword</param> public CoachWithPassword(Coach coach, string password) : base(coach.id, coach.name, coach.email, coach.teams) { this.password = password; }
/// <summary> /// Sends a Coach /// </summary> /// <param name="s"> Stream </param> /// <param name="msg"> Coach to send </param> public static void Send(Stream s, Coach msg) { BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(s, msg); }