Пример #1
0
        public static void AddAuthor(Author author)
        {
            Dictionary<long, string> fromCache = cachedAuthors;
            if (fromCache.ContainsKey(author.ID))
                return;

            fromCache.Add(author.ID, author.ToString());
        }
Пример #2
0
 public static void UpdateAuthor(Author author)
 {
     Dictionary<long, string> fromCache = cachedAuthors;
     if (fromCache.ContainsKey(author.ID))
         fromCache[author.ID] = author.ToString();
     else
         fromCache.Add(author.ID, author.ToString());
 }