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; }
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); }
protected override IDataStorage GetDataStorage( IEnumerable<BlogMeta> blogMetas = null, IEnumerable<BlogPost> blogPosts = null) { var documentStore = EmbeddableDocumentStoreTestFactory.CreateWithData(blogMetas: blogMetas, blogPosts: blogPosts); var dataStorage = new RavenDbDataStorage(documentStore); return dataStorage; }