Example #1
0
        public void Build(List <PhotoSession> photoSessions)
        {
            BuildedTrips = new List <TripCandidate>();

            if (!photoSessions.Any())
            {
                return;
            }

            while (InitializeNewTripCandidate(ref photoSessions))
            {
                DestinationBuilder.Build(CurrentTripCandidate.PhotoSessions);

                foreach (var destCandidate in DestinationBuilder.Candidates)
                {
                    CurrentTripCandidate.Destinations.Add(destCandidate);
                }

                InitializeTripCandidate(CurrentTripCandidate);

                BuildedTrips.Add(CurrentTripCandidate);
            }
        }
Example #2
0
 public TripSmartBuilder(LocationService locationService, PhotoStore photoStore, DestinationBuilder destinationBuilder)
 {
     _locationService   = locationService;
     _photoStore        = photoStore;
     DestinationBuilder = destinationBuilder;
 }