示例#1
0
文件: Companies.cs 项目: mixae1/3case
        static DateTime GetLastVkPost(string domain)
        {
            if (domain == null)
            {
                return(DateTime.MinValue);
            }
            var t = new VKGroup(domain);

            t.LoadPosts(2);
            return(t.DTofLastTimePostedWithWall());
        }
示例#2
0
文件: Linqer.cs 项目: mixae1/3case
        /// <summary>
        /// получаем дату последнего поста в вк
        /// TODO:доделать получение постов и другую херню
        /// </summary>
        /// <param name="urls"></param>
        /// <returns></returns>
        List <DateTime?> GetVkPostDateTime(List <string> urls)
        {
            Console.WriteLine("getting vk info:");
            List <DateTime?> vkUrls = new List <DateTime?>();
            int i = 1;

            foreach (var tmp in urls)
            {
                DateTime?dt = null;

                if (!string.IsNullOrEmpty(tmp))
                {
                    var vk = new VKGroup(tmp);
                    vk.LoadPosts(2);
                    dt = vk.DTofLastTimePostedWithWall();
                    Console.WriteLine(i + "/" + 25 + " " + tmp);
                }
                vkUrls.Add(dt);
            }
            Console.WriteLine("vk finish ");
            return(vkUrls);
        }