示例#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));
 }
示例#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)));
 }
示例#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);
        }
示例#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;
        }