Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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());
 }