Ejemplo n.º 1
0
 /// <summary>
 /// Searches for the first fitting announcement matching the given reference.
 /// </summary>
 /// <param name="gazetteReference">Gazette reference.</param>
 /// <returns>Gazette announcement, or <c>null</c> if nothing found.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="gazetteReference"/> is <c>null</c>.</exception>
 public GazetteEntry FindAnnouncement(GazetteRelated gazetteReference)
 {
     if ( gazetteReference == null )
     {
         throw new ArgumentNullException("gazetteReference");
     }
     return AllGazetteEntries.FirstOrDefault(x => x.IsMatchWith(gazetteReference));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Searches for the first fitting announcement matching the given reference.
 /// </summary>
 /// <param name="gazetteReference">Gazette reference.</param>
 /// <returns>Gazette announcement, or <c>null</c> if nothing found.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="gazetteReference"/> is <c>null</c>.</exception>
 public GazetteEntry FindAnnouncement(GazetteRelated gazetteReference)
 {
     if (gazetteReference == null)
     {
         throw new ArgumentNullException("gazetteReference");
     }
     return(AllGazetteEntries.FirstOrDefault(x => x.IsMatchWith(gazetteReference)));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Checks whether the announcement matches the given reference.
        /// </summary>
        /// <param name="gazetteReference">Gazette reference.</param>
        /// <returns><c>true</c> if matching the reference, <c>false</c> otherwise.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="gazetteReference"/> is <c>null</c>.</exception>
        public Boolean IsMatchWith(GazetteRelated gazetteReference)
        {
            if (gazetteReference == null)
            {
                throw new ArgumentNullException("gazetteReference");
            }

            return
                (gazetteReference.volume == this.volume &&
                 gazetteReference.issue == this.issue &&
                 gazetteReference.page == this.FirstPage &&
                 gazetteReference.date == this.publication);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Checks whether the announcement matches the given reference.
        /// </summary>
        /// <param name="gazetteReference">Gazette reference.</param>
        /// <returns><c>true</c> if matching the reference, <c>false</c> otherwise.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="gazetteReference"/> is <c>null</c>.</exception>
        public Boolean IsMatchWith(GazetteRelated gazetteReference)
        {
            if ( gazetteReference == null )
            {
                throw new ArgumentNullException("gazetteReference");
            }

            return
                gazetteReference.volume == this.volume &&
                gazetteReference.issue == this.issue &&
                gazetteReference.page == this.FirstPage &&
                gazetteReference.date == this.publication;
        }