public TwitterDataProvider(TwitterDataConfig config) : base(config) { switch (_config.QueryType.ToLower()) { case "search": _parser = new TwitterSearchParser(); break; case "hometimeline": case "usertimeline": default: _parser = new TwitterTimelineParser(); break; } }
public override async Task <IEnumerable <TwitterSchema> > LoadDataAsync(TwitterDataConfig config) { IParser <TwitterSchema> parser = null; if (config != null) { switch (config.QueryType) { case TwitterQueryType.Search: parser = new TwitterSearchParser(); break; case TwitterQueryType.Home: case TwitterQueryType.User: default: parser = new TwitterTimelineParser(); break; } } return(await LoadDataAsync(config, parser)); }