コード例 #1
0
        /// <summary>
        /// Gets the previous What If article
        /// </summary>
        /// <returns>Previous What If article, null if no previous article</returns>
        public WhatIfArticle Previous()
        {
            WhatIfArchiveEntry prevArchiveEntry = WhatIf.WhatIfDictionary.OrderByDescending(x => x.Key).SkipWhile(x => x.Key >= Id).FirstOrDefault().Value;

            if (prevArchiveEntry != null)
            {
                return(WhatIf.GetArticle(prevArchiveEntry));
            }
            return(null);
        }
コード例 #2
0
        /// <summary>
        /// Gets the next What If article
        /// </summary>
        /// <returns>Next What If article, null if no next article</returns>
        public WhatIfArticle Next()
        {
            WhatIfArchiveEntry nextArchiveEntry = WhatIf.WhatIfDictionary.OrderBy(x => x.Key).SkipWhile(x => x.Key <= Id).FirstOrDefault().Value;

            if (nextArchiveEntry != null)
            {
                return(WhatIf.GetArticle(nextArchiveEntry));
            }
            return(null);
        }