-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBaseModule.cs
More file actions
28 lines (26 loc) · 873 Bytes
/
BaseModule.cs
File metadata and controls
28 lines (26 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace SmartCrawler.Modules;
/**
* Base interface for all modules
* Each module must be inherited from this interface
*/
public interface IBaseModule
{
/// <summary>
/// Matches a DatasetItem property to the result of the processing function
/// </summary>
/// <remarks>
/// Returns an action the matches a property instead of matching it right away.
/// That is done because all actions are then ran together in the crawler.
/// </remarks>
public Action<string, DatasetItem> Setup();
}
public interface IBaseModuleSetup<out T> : IBaseModule
{
/// <summary>
/// Processes the raw html content and returns the data in a form of a pre-set module data type
/// </summary>
/// <remarks>
/// Most of the processing logic is comprised of complex regex expressions
/// </remarks>
public T Process(string html);
}