Exemple #1
0
        public static async Task <UserTalk[]> GetAsync(MediaWiki wiki, IEnumerable <string> userNames)
        {
            string category;

            if (!AddOnTopCategories.TryGetValue(wiki.Code, out category))
            {
                return(userNames.Select(u => new UserTalk(u, wiki, false)).ToArray());
            }

            return((await wiki.GetCategories(userNames.Select(u => GetPageName(u)), category))
                   .Select(x => new UserTalk(GetUserName(x.Key), wiki, x.Value.Length > 0))
                   .ToArray());
        }
Exemple #2
0
 public UserTalk(string userName, MediaWiki wiki, bool addOnTop)
 {
     UserName  = userName;
     _wiki     = wiki;
     _addOnTop = addOnTop;
 }