Class SepaBankInfo
public class SepaBankInfo : IComparable<SepaBankInfo>, IComparable
- Inheritance
-
SepaBankInfo
- Implements
- Inherited Members
Remarks
Comparing SepaBankInfo instances via IComparable, only compares
the CountryCode and the BankCode. Together these should be
unique in any container.
Constructors
SepaBankInfo()
public SepaBankInfo()
SepaBankInfo(string, string, SepaBIC, string)
public SepaBankInfo(string sCountryCode, string sBankCode, SepaBIC tBIC, string sBankName)
Parameters
sCountryCodestringsBankCodestringThe bank code without padding.
tBICSepaBICsBankNamestringOptional bank name, may be
nullif not known.
Properties
BIC
The BIC of this entry.
public SepaBIC BIC { get; set; }
Property Value
Remarks
This value should never be IsNull.
BankCode
The bank identification code of this entry.
public string BankCode { get; set; }
Property Value
Remarks
This is never null or empty.
BankName
The optional bank name, may be null if not known.
public string BankName { get; set; }
Property Value
CountryCode
The country code that of this entry.
public string CountryCode { get; set; }
Property Value
Remarks
This is never null or empty.
Methods
Adopt(SepaBankInfo)
Adopts all properties of the given bank information to this bank information.
public void Adopt(SepaBankInfo aBankInfo)
Parameters
aBankInfoSepaBankInfoAnother bank information that shall be incorporated into this bank information. This must not be
null. The CountryCode and BankCode of that bank information must be equal to this bank information.
Remarks
Any non-null and non-empty properties of the other bank information will overwrite the current property values of this bank information.
Exceptions
- ArgumentNullException
The parameter
aBankInfowasnull.- ArgumentException
The CountryCode or BankCode of this and the given SepaBankInfo were not equal.
CompareTo(SepaBankInfo)
public int CompareTo(SepaBankInfo aOtherBankInfo)
Parameters
aOtherBankInfoSepaBankInfo
Returns
FromJson(JsonObject)
Creates a new SepaBankInfo from a JSON object.
public static SepaBankInfo FromJson(JsonObject js)
Parameters
jsJsonObjectThe JSON object from which to get the attributes for the new SepaBankInfo instance. The field names of this JSON object must match the CSV header names. All fields values are treated as strings. If this parameter is
null, then the return value will benull, too.
Returns
- See Also
GetAttribute(string)
Get an additional named attribute from this bank information record.
public string GetAttribute(string sAttrName)
Parameters
sAttrNamestringThe name of the attribute. This must not be
null, or an empty string.
Returns
- string
If the attribute exists, then its value is returned, which may be a
nullvalue or an empty string. If the attribute does not exist, thennullis returned.
Exceptions
- ArgumentNullException
The parameter
sAttrNamewasnull.- ArgumentException
The
sAttrNamewas empty.
SetAttribute(string, string)
Adds another attribute value to this bank information.
public void SetAttribute(string sAttrName, string sAttrValue)
Parameters
sAttrNamestringThe name of the attribute. This must not be
null, or an empty string. The name must be unique. An attribute with the same name cannot be added twice.sAttrValuestringThe attribute string value. If this is
nullor an empty string, then nothing will be added.
Exceptions
- ArgumentNullException
The parameter
sAttrNamewasnull.- ArgumentException
The
sAttrNamewas empty, or an attribute with that name was already added to this bank information.
ToJson()
Creates a JSON object with all attributes in this SepaBankInfo.
public JsonObject ToJson()
Returns
Remarks
The CSV header names are used as the JSON field names. All field values are JSON strings.
- See Also
ToString()
public override string ToString()