Beispiel #1
0
        /// <summary>
        /// Adds a bookie to a certain event.
        /// </summary>
        /// <param name="e">Event.</param>
        /// <param name="bookieEmail">Email of a bookie.</param>
        public void SubscribeBookieToEvent(Event e, string bookieEmail)
        {
            e.AddSubscribedBookie(bookieEmail);
            Bookie b = ((Bookie)users[bookieEmail]);

            e.Subscribe(b);
        }
Beispiel #2
0
        public override bool Equals(Object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            if (obj == null || obj.GetType() != this.GetType())
            {
                return(false);
            }
            Bookie b = (Bookie)obj;

            return(EventsEquals(b.getSubscribedEvents()) && base.Equals(b));
        }
Beispiel #3
0
        /** ------------------------ BOOKIES ---------------------------------- **/

        /// <summary>
        /// Adds a bookie to the system.
        /// </summary>
        /// <param name="name">Name of the bookie.</param>
        /// <param name="email">Email of the bookie.</param>
        /// <param name="pwd">Password of the bookie.</param>
        public void AddBookie(string name, string email, string pwd)
        {
            Bookie b = new Bookie(name, email, pwd);

            users.Add(email, b);
        }
Beispiel #4
0
 /// <sumary>
 /// Copy Constructor.
 /// </sumary>
 /// <param name="b">Bookie to be copied.</param>
 public Bookie(Bookie b) : base((User)b)
 {
     subscribedEvents = b.getSubscribedEvents();
 }