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, Int32)
Declaration
public Scraper(string sScraperName, int nPriority = 100)
Parameters
Type |
Name |
Description |
System.String |
sScraperName |
Display name of this scraper implementation. Must not be null or empty.
|
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
AllProductInfos
Declaration
public ScraperProductInfo[] AllProductInfos { get; }
Property Value
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
AddBankAccountProduct(String, String, String, Func<SepaIBAN, Boolean>)
Declaration
protected ScraperProductInfo AddBankAccountProduct(string sProductName, string sIconName, string sLoginUrl, Func<SepaIBAN, bool> fnMatchIBAN)
Parameters
Type |
Name |
Description |
System.String |
sProductName |
|
System.String |
sIconName |
|
System.String |
sLoginUrl |
|
System.Func<SepaIBAN, System.Boolean> |
fnMatchIBAN |
|
Returns
AddBankAccountProduct(String, String, String, String, String[])
Add a bank account product with IBAN account numbers supported by this scraper.
Declaration
protected ScraperProductInfo AddBankAccountProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
Type |
Name |
Description |
System.String |
sProductName |
The ProductName of the bank account. Must not be
null or an empty string. Usually this is a trivial string like
"Postbank Konto".
|
System.String |
sIconName |
The name of the icon that shall be presented with this bank account. Must not be
null or an empty string.
|
System.String |
sLoginUrl |
The URL where the user usually interactively logs in, in order to access this
account. This may be presented on the UI as a fallback if the screen scraper fails.
|
System.String |
sCountryCode |
The country code that must appear in the IBAN for this account product. Must not be
null or an empty string.
|
System.String[] |
vsBankCodes |
A list of bank codes that must appear in the IBAN for this account product. Must not be
null or an empty array.
must be overridden.
|
Returns
AddCreditCardProduct(String, String, String, String[])
Add a credit card product supported by this scraper.
Declaration
protected ScraperProductInfo AddCreditCardProduct(string sProductName, string sIconName, string sLoginUrl, params string[] vsBinRanges)
Parameters
Type |
Name |
Description |
System.String |
sProductName |
The ProductName of the credit card. Must not be
null or an empty string.
|
System.String |
sIconName |
The name of the icon that shall be presented with this bank account. Must not be
null or an empty string.
|
System.String |
sLoginUrl |
The URL where the user usually interactively logs in, in order to access this
account. This may be presented on the UI as a fallback if the screen scraper fails.
|
System.String[] |
vsBinRanges |
A list of BIN ranges for the credit card product.
|
Returns
AddCreditCardWithIbanProduct(String, String, String, String, String[])
Declaration
protected ScraperProductInfo AddCreditCardWithIbanProduct(string sProductName, string sIconName, string sLoginUrl, string sCountryCode, params string[] vsBankCodes)
Parameters
Type |
Name |
Description |
System.String |
sProductName |
|
System.String |
sIconName |
|
System.String |
sLoginUrl |
|
System.String |
sCountryCode |
|
System.String[] |
vsBankCodes |
|
Returns
AddProduct(ScraperProductType, ScraperAccountNumberType, String, String, String, String, String[])
Declaration
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, ScraperAccountNumberType nAccountNumberType, string sProductName, string sIconName, string sLoginUrl, string sCountryCode, string[] vsAccountNumberRanges)
Parameters
Type |
Name |
Description |
ScraperProductType |
nProductType |
|
ScraperAccountNumberType |
nAccountNumberType |
|
System.String |
sProductName |
|
System.String |
sIconName |
|
System.String |
sLoginUrl |
|
System.String |
sCountryCode |
|
System.String[] |
vsAccountNumberRanges |
|
Returns
AddProduct(ScraperProductType, String, String, String, Func<SepaIBAN, Boolean>)
Declaration
protected ScraperProductInfo AddProduct(ScraperProductType nProductType, string sProductName, string sIconName, string sLoginUrl, Func<SepaIBAN, bool> fnMatchIBAN)
Parameters
Type |
Name |
Description |
ScraperProductType |
nProductType |
|
System.String |
sProductName |
|
System.String |
sIconName |
|
System.String |
sLoginUrl |
|
System.Func<SepaIBAN, System.Boolean> |
fnMatchIBAN |
|
Returns
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
No default implementation. Must be provided by the derived class.
Declaration
public abstract IScraperContact OnCreateScraperContact(SepaAccount aAcct)
Parameters
Returns
Implements