Class Scraper
Convenient base implementation with method stubs for IScraper.
Inheritance
System.Object
Scraper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Subsembly.Scraper.dll
Syntax
public abstract class Scraper : IScraper
Constructors
Scraper(String, ScraperCreditCardInfos)
Declaration
public Scraper(string sScraperName, ScraperCreditCardInfos vCardInfos)
Parameters
Type |
Name |
Description |
System.String |
sScraperName |
Display name of this screaper implementation. Must not be null or empty.
|
ScraperCreditCardInfos |
vCardInfos |
|
Scraper(String, String, String, Int32)
Declaration
public Scraper(string sScraperName, string sProductName, string sIconName, int nPriority = 100)
Parameters
Type |
Name |
Description |
System.String |
sScraperName |
Display name of this screaper implementation. Must not be null or empty.
|
System.String |
sProductName |
Optional product name for the default implementation of
GetProductInfo(JsonObject). If this is not provided, then
the derived class must override OnGetProductInfo(SepaAccount)
|
System.String |
sIconName |
Optional icon name for the default implementation of
GetProductInfo(JsonObject).
|
System.Int32 |
nPriority |
|
Fields
SCRAPERPRIORITY_HIGH
Declaration
public const int SCRAPERPRIORITY_HIGH = 1000
Field Value
Type |
Description |
System.Int32 |
|
SCRAPERPRIORITY_LOW
Declaration
public const int SCRAPERPRIORITY_LOW = 10
Field Value
Type |
Description |
System.Int32 |
|
SCRAPERPRIORITY_NORMAL
The default priority for all scrapers.
Declaration
public const int SCRAPERPRIORITY_NORMAL = 100
Field Value
Type |
Description |
System.Int32 |
|
Properties
ClassName
Returns the name of the class, as it was given to the constructor.
Declaration
public string ClassName { get; }
Property Value
Type |
Description |
System.String |
|
Name
Returns the name that was given to the constructor.
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Priority
Returns the priority value that was given to the constructor.
Declaration
public int Priority { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
CanScrape(JsonObject)
Declaration
public bool CanScrape(JsonObject jsAcct)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
public IScraperContact CreateContact(JsonObject jsAcct)
Parameters
Returns
GetProductInfo(JsonObject)
Declaration
public ScraperProductInfo GetProductInfo(JsonObject jsAcct)
Parameters
Returns
OnCanScrape(SepaAccount)
Declaration
public virtual bool OnCanScrape(SepaAccount aAcct)
Parameters
Returns
Type |
Description |
System.Boolean |
|
No default implementation. Must be provided by the derived class.
Declaration
public abstract IScraperContact OnCreateScraperContact(SepaAccount aAcct)
Parameters
Returns
OnGetProductInfo(SepaAccount)
Override this, if you support different account products with different product
infos. The default implementation returns a new ScraperProductInfo
with the details given to the constructor.
Declaration
public virtual ScraperProductInfo OnGetProductInfo(SepaAccount aAcct)
Parameters
Returns
Implements