/// <summary> /// Initializes a new instance of the <see cref="FeedSource"/> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="location">The feedlist URL</param> internal BanditFeedSource(INewsComponentsConfiguration configuration, SubscriptionLocation location) { p_configuration = configuration; if (p_configuration == null) { p_configuration = DefaultConfiguration; } this.location = location; // check for programmers error in configuration: ValidateAndThrow(Configuration); LoadFeedlistSchema(); rssParser = new RssParser(this); if (!String.IsNullOrEmpty(EnclosureFolder)) { enclosureDownloader = new BackgroundDownloadManager(this); enclosureDownloader.DownloadCompleted += OnEnclosureDownloadComplete; } AsyncWebRequest = new AsyncWebRequest(); AsyncWebRequest.OnAllRequestsComplete += OnAllRequestsComplete; }
/// <summary> /// Initializes a new instance of the <see cref="FeedSource"/> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="location">The user credentials</param> internal FacebookFeedSource(INewsComponentsConfiguration configuration, SubscriptionLocation location) { this.p_configuration = configuration; if (this.p_configuration == null) { this.p_configuration = FeedSource.DefaultConfiguration; } this.location = location; // check for programmers error in configuration: ValidateAndThrow(this.Configuration); //If only Domain is set then we have the auth token otherwise we have secret + session key + uid if (String.IsNullOrEmpty(location.Credentials.UserName) && String.IsNullOrEmpty(location.Credentials.Password) && !String.IsNullOrEmpty(location.Credentials.Domain)) { SetAuthToken(location.Credentials.Domain); GetSessionKey(); } else { this.facebookUserId = location.Credentials.UserName; this.clientSecret = location.Credentials.Password; this.sessionKey = location.Credentials.Domain; } this.AsyncWebRequest = new AsyncWebRequest(); this.AsyncWebRequest.OnAllRequestsComplete += this.OnAllRequestsComplete; }
internal FeedlyCloudFeedSource(INewsComponentsConfiguration configuration, SubscriptionLocation location) { this.p_configuration = configuration; if (this.p_configuration == null) { this.p_configuration = FeedSource.DefaultConfiguration; } this.location = location; // check for programmers error in configuration: ValidateAndThrow(this.Configuration); //register with background thread for updating Google Reader FeedlyCloudUpdater.RegisterFeedSource(this); }