Exemple #1
0
        public void DeleteTrip(UserTrip trip)
        {
            if (trip.UserId != Id)
            {
                return;
            }

            if (_trips.Contains(trip))
            {
                _trips.Remove(trip);
            }
        }
Exemple #2
0
        public void AddTrip(UserTrip trip)
        {
            if (trip.UserId != Id)
            {
                return;
            }

            if (!_trips.Contains(trip))
            {
                _trips.Add(trip);
            }
        }
Exemple #3
0
        public bool Equals(UserTrip trip)
        {
            if (trip == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, trip))
            {
                return(true);
            }

            return(TripName == trip.TripName && UserId == trip.UserId);
        }
Exemple #4
0
 internal UserTrip(UserTrip aUserTrip)
     : this(aUserTrip.UserId, aUserTrip.TripName, aUserTrip.HasParticipated, aUserTrip.HasOrganized, aUserTrip.UserNote,
            aUserTrip.TripAmount, aUserTrip.ModificationDate)
 {
 }