Interface ISupaRecord
An abstract name/value container representing a single SUPA data record.
A SUPA record is basically just a name/value string dictionary.
Assembly: Subsembly.Sepa.dll
Syntax
public interface ISupaRecord
Methods
GetBool(String)
Gets the named field value from this record as a boolean value. If the field
does not exist, then false
is returned.
Declaration
bool GetBool(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.Boolean |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
GetDate(String)
Attempts to get a date record value. If the requested field does not exist,
then the value Date.MinValue is returned.
Declaration
DateTime GetDate(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.DateTime |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
System.FormatException |
The extracted field data was not a valid date format.
|
GetDecimal(String)
Attempts to get a decimal record value. If the requested field does not exist,
then the value Dezimal.Zero is returned.
Declaration
decimal GetDecimal(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.Decimal |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
GetNumber(String)
Attempts to get an integer record value. If the requested field does not exist,
then the value zero is returned.
Declaration
int GetNumber(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.Int32 |
|
GetValue(String)
Gets the named field value from this record as a string. If the field
does not exist, then null
is returned.
Declaration
string GetValue(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.String |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
HasValue(String)
Indicates whether the record contains a non-null entry for the given field.
Declaration
bool HasValue(string sName)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
Returns
Type |
Description |
System.Boolean |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
SetBool(String, Boolean)
Sets the named field value from the SUPA formatted boolean value.
Declaration
void SetBool(string sName, bool fValue)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.Boolean |
fValue |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
SetDate(String, DateTime)
Declaration
void SetDate(string sName, DateTime tDate)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.DateTime |
tDate |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
SetDecimal(String, Decimal)
Declaration
void SetDecimal(string sName, decimal nValue)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.Decimal |
nValue |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
SetNumber(String, Int32)
Declaration
void SetNumber(string sName, int nValue)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.Int32 |
nValue |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
SetValue(String, String)
Sets the named field with the string value.
Declaration
void SetValue(string sName, string sValue)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.String |
sValue |
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter sName was null .
|
See Also