Benny-Scraper Classes
In-depth documentation of the classes within Benny-Scraper, ordered by their sequence in the application’s execution.
Table of Contents
- Program.cs
- NovelProcessor
- Class 2
- …other classes…
Program.cs
The starting point of the application. Manages command-line options, database connections, and service registration.
Properties
| Name | Type | Description |
|---|---|---|
| Logger | NLog.Logger |
Static logger for the class, used for logging messages throughout the application. |
| Container | IContainer |
The dependency injection container that manages the lifetime of services used by the application. |
| AreYouSure | string |
A constant message prompt used for confirmation dialogs within the application. |
| Configuration | IConfiguration |
Holds the configuration settings loaded from appsettings.json or other configuration sources. |
Methods
| Name | Parameters | Return Type | Description |
|---|---|---|---|
| Main | string[] args |
void |
The entry point of the application. |
| DeleteOldLogs | None | void |
Deletes logs older than 5 days. Creates log folder if not present. Logs stored in /bennyscraper/logs. |
| SetupLogger | LogLevel logLevel |
void |
Configures log creation and output format. Determines runtime log level (default is LogLevel.Info). |
| BuildConfiguration | None | IConfigurationRoot |
Loads configuration from appsettings.json for application services. |
| ConfigureServices | ContainerBuilder builder |
void |
Registers dependencies and serializes NovelScraperSettings for site scraping. Sets lifetimes of dependencies. |
NovelProcessor
Handles the adding or updating of novels, makes use of appropriate services to store the novels to the database.
Properties
(Table of properties)
Methods
(Table of methods)
Class 2
(Continue in similar format for each class)
… (and so on for each class)