Class ScraperBuilder
A class for configuring scraper-related services
Inheritance
System.Object
ScraperBuilder
Namespace: Scraper.Net
Assembly: Scraper.Net.dll
Syntax
public class ScraperBuilder : object
Constructors
| Improve this Doc View SourceScraperBuilder(IServiceCollection)
Declaration
public ScraperBuilder(IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services |
Properties
| Improve this Doc View SourceServices
Declaration
public IServiceCollection Services { get; }
Property Value
| Type | Description |
|---|---|
| IServiceCollection |
Methods
| Improve this Doc View SourceAddPostFilter(PostFilter)
Adds a singleton service of the type PostFilter to the specified IServiceCollection
Declaration
public ScraperBuilder AddPostFilter(PostFilter filter)
Parameters
| Type | Name | Description |
|---|---|---|
| PostFilter | filter | The filter |
Returns
| Type | Description |
|---|---|
| ScraperBuilder | A reference to this instance after the operation has completed |
AddPostProcessor(Func<IServiceProvider, IPostProcessor>)
Adds a singleton service of the type IPostProcessor using a
factory specified in factory to the
specified IServiceCollection
Declaration
public ScraperBuilder AddPostProcessor(Func<IServiceProvider, IPostProcessor> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IServiceProvider, IPostProcessor> | factory | The factory that creates the service |
Returns
| Type | Description |
|---|---|
| ScraperBuilder | A reference to this instance after the operation has completed |
AddScraper(Func<IServiceProvider, (IPlatformScraper, String)>)
Adds a singleton service of the type IPlatformScraper and string platform using a
factory specified in factory to the
specified IServiceCollection
Declaration
public ScraperBuilder AddScraper(Func<IServiceProvider, (IPlatformScraper, string)> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IServiceProvider, System.ValueTuple<IPlatformScraper, System.String>> | factory | The factory that creates the service |
Returns
| Type | Description |
|---|---|
| ScraperBuilder | A reference to this instance after the operation has completed |