Ejemplo n.º 1
0
        private Dictionary <string, Abbreviation> GetAllAbbreviations()
        {
            var result = new Dictionary <string, Abbreviation>(StringComparer.OrdinalIgnoreCase);

            Abbreviations.ForEach(abbr =>
            {
                abbr.Value     = abbr.Value;
                abbr.BibleBook = this;
            });

            foreach (var abbr in Abbreviations)
            {
                if (!result.ContainsKey(abbr.Value))
                {
                    result.Add(abbr.Value, abbr);
                }
            }

            if (!result.ContainsKey(Name))
            {
                result.Add(Name, new Abbreviation(Name)
                {
                    IsFullBookName = true, BibleBook = this
                });
            }

            return(result);
        }