Interface ISupaRecord
An abstract name/value container representing a single SUPA data record. A SUPA record is basically just a name/value string dictionary.
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.
bool GetBool(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
GetDate(string)
Attempts to get a date record value. If the requested field does not exist, then the value Date.MinValue is returned.
DateTime GetDate(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.- FormatException
The extracted field data was not a valid date format.
GetDateTime(string)
Attempts to get a date and time record value. If the requested field does not exist, then the value Date.MinValue is returned.
DateTime GetDateTime(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.- 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.
decimal GetDecimal(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
GetNumber(string)
Attempts to get an integer record value. If the requested field does not exist, then the value zero is returned.
int GetNumber(string sName)
Parameters
sNamestring
Returns
GetValue(string)
Gets the named field value from this record as a string. If the field
does not exist, then null is returned.
string GetValue(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
HasValue(string)
Indicates whether the record contains a non-null entry for the given field.
bool HasValue(string sName)
Parameters
sNamestring
Returns
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetBool(string, bool)
Sets the named field value from the SUPA formatted boolean value.
void SetBool(string sName, bool fValue)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetDate(string, DateTime)
void SetDate(string sName, DateTime tDate)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetDateTime(string, DateTime)
void SetDateTime(string sName, DateTime tDate)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetDecimal(string, decimal)
void SetDecimal(string sName, decimal nValue)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetNumber(string, int)
void SetNumber(string sName, int nValue)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.
SetValue(string, string)
Sets the named field with the string value.
void SetValue(string sName, string sValue)
Parameters
Exceptions
- ArgumentNullException
The parameter
sNamewasnull.