Beispiel #1
0
        /// <summary>
        /// Creates all details (cross product of photos and detail areas)
        /// </summary>
        /// <returns></returns>
        public PhotoDetailCollection CreateAllDetails()
        {
            var l = new PhotoDetailCollection();

            foreach (var photo in Photos)
            {
                foreach (var detailArea in DetailAreas)
                {
                    l.Add(new PhotoDetail(photo, detailArea));
                }
            }
            return(l);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GroupFilter"/> class.
 /// </summary>
 /// <param name="basis">The basis.</param>
 public GroupFilter(PhotoDetailCollection basis)
     : this()
 {
     Input     = basis;
     Parameter = Parameters[0];
 }
Beispiel #3
0
 /// <summary>
 /// Filters the details collection by the specified value.
 /// </summary>
 /// <param name="value">a parameter value (eg. "2.8" for parameter "Aperture").</param>
 /// <param name="fromDetails">the input set of photo details</param>
 /// <returns>the matching photo details</returns>
 public PhotoDetailCollection Filter(string value, PhotoDetailCollection fromDetails = null)
 {
     fromDetails = fromDetails ?? Input;
     return(new PhotoDetailCollection(fromDetails.Where(pd => pd.Parameters[Parameter] == value)));
 }