コード例 #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
ファイル: GazetteEntry.cs プロジェクト: wanjarus/tambon
        /// <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
ファイル: GazetteEntry.cs プロジェクト: PaulCharlton/tambon
        /// <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;
        }