public BlogSyncServicePostsHelper(BlogSyncConfiguration config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } this.config = config; }
public BlogSyncService(BlogSyncConfiguration config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } this.Config = config; this.blogSettings = new BlogSettingsHelper(config.BlogSettings); this.metaHelper = new BlogSyncServiceMetaHelper(config); this.postsHelper = new BlogSyncServicePostsHelper(config); }
private static BlogSyncService GetBlogSyncService(IDocumentStore documentStore) { if (documentStore == null) { throw new ArgumentNullException(nameof(documentStore)); } var blogSource = AppSettingsFactory.BuildBlogSource((username, password) => new BloggerBlogSource(password)); var dataStorage = new RavenDbDataStorage(documentStore); var syncConfig = new BlogSyncConfiguration(blogSource, dataStorage, blogSettings: BlogSettingsLazy.Value); syncConfig.TransformersProvider.Transformers.Clear(); var blogSync = new BlogSyncService(syncConfig); return blogSync; }
internal static BlogSyncConfiguration Create( IBlogSource blogSource, IDataStorage dataStorage, IEnumerable<BlogSetting> blogSettings) { if (blogSource == null) { throw new ArgumentNullException(nameof(blogSource)); } if (dataStorage == null) { throw new ArgumentNullException(nameof(dataStorage)); } var config = new BlogSyncConfiguration( blogSource, dataStorage, slugProvider: null, blavenIdProvider: null, transformersProvider: null, blogSettings: blogSettings); return config; }