/// <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)); }
/// <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))); }
/// <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); }
/// <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; }