private async Task <List <string> > ParseAsVK(string link) { VkParser vk = new VkParser(true); if (link.Contains("wall")) { return(await vk.GetLinksFromPost(link)); } return(await vk.GetLinksFromAlbum(link)); }
public ParseVkJob( TelegramBotClient client, StateRepository stateRepository, NoticeRepository noticeRepository, VkParser parser, Categorizer categorizer, Geocoding geocoding, ILogger logger) : base(client, stateRepository, logger) { this.parser = parser; this.noticeRepository = noticeRepository; this.categorizer = categorizer; this.geocoding = geocoding; }
public MainViewModel() { vkParser = new VkParser(); excelExporter = new ExcelExporterXML(); vkParser.OnNewData += VkParser_OnNewData; vkParser.NewMessage += VkParser_NewMessage; excelExporter.OneNewMessage += VkParser_NewMessage; vkParser.OnCompleted += VkParser_OnCompleted; vkParser.ProgressChange += VkParser_ProgressChange; excelExporter.ProgressChaneged += VkParser_ProgressChange; AuthorizeCommand = new Command(Authorize); StartParseCommand = new Command(StartParse); ExportToExelCommand = new Command(ExportToExel); ClearTableCommand = new Command(CleareTable); SelectCountryCommand = new Command(SelectCoutry); SelectUniversityCommand = new Command(SelectUniversity); StopParseCommand = new Command(StopParse); ListRelation = ParametrLists.GetRelationList(); BindingOperations.EnableCollectionSynchronization(list, new object()); }