Default implementation of IFieldSet. More...
Public Member Functions | |
DefaultFieldSet (string[] values) | |
Creates a DefaultFieldSet with the specified values. More... | |
DefaultFieldSet (string[] names, string[] values) | |
Creates a DefaultFieldSet with the specified names and values. More... | |
string | ReadString (int index) |
Reads a field as a string. More... | |
string | ReadString (string name) |
Reads a field as a string. More... | |
string | ReadRawString (int index) |
Reads a field as a string. More... | |
string | ReadRawString (string name) |
Reads a field as a string. More... | |
bool | ReadBoolean (int index, string trueValue="true") |
Reads a field as a boolean. More... | |
bool | ReadBoolean (string name, string trueValue="true") |
Reads a field as a boolean. More... | |
char | ReadChar (int index) |
Reads a field as a character. More... | |
char | ReadChar (string name) |
Reads a field as a character. More... | |
byte | ReadByte (int index) |
Reads a field as a byte. More... | |
byte | ReadByte (string name) |
Reads a field as a byte. More... | |
short | ReadShort (int index) |
Reads a field as a short. More... | |
short | ReadShort (string name) |
Reads a field as a short. More... | |
int | ReadInt (int index) |
Reads a field as an int. More... | |
int | ReadInt (string name) |
Reads a field as an int. More... | |
int | ReadInt (int index, int defaultValue) |
Reads a field as an int. More... | |
int | ReadInt (string name, int defaultValue) |
Reads a field as an int. More... | |
long | ReadLong (int index) |
Reads a field as a long. More... | |
long | ReadLong (string name) |
Reads a field as a long. More... | |
long | ReadLong (int index, long defaultValue) |
Reads a field as a long. More... | |
long | ReadLong (string name, long defaultValue) |
Reads a field as a long. More... | |
float | ReadFloat (int index) |
Reads a field as a float. More... | |
float | ReadFloat (string name) |
Reads a field as a float. More... | |
double | ReadDouble (int index) |
Reads a field as a double. More... | |
double | ReadDouble (string name) |
Reads a field as a double. More... | |
decimal | ReadDecimal (int index) |
Reads a field as a decimal. More... | |
decimal | ReadDecimal (string name) |
Reads a field as a decimal. More... | |
decimal | ReadDecimal (int index, decimal defaultValue) |
Reads a field as a decimal. More... | |
decimal | ReadDecimal (string name, decimal defaultValue) |
Reads a field as a decimal. More... | |
DateTime | ReadDate (int index) |
Reads a field as a date. More... | |
DateTime | ReadDate (string name) |
Reads a field as a date. More... | |
DateTime | ReadDate (int index, DateTime defaultValue) |
Reads a field as a date. More... | |
DateTime | ReadDate (string name, DateTime defaultValue) |
Reads a field as a date. More... | |
DateTime | ReadDate (int index, string pattern) |
Reads a field as a date. More... | |
DateTime | ReadDate (string name, string pattern) |
Reads a field as a date. More... | |
DateTime | ReadDate (int index, string pattern, DateTime defaultValue) |
Reads a field as a date, using defaultValue if needed. More... | |
DateTime | ReadDate (string name, string pattern, DateTime defaultValue) |
Reads a field as a date. More... | |
Properties | |
string[] | Names [get] |
The names of the fields More... | |
string[] | Values [get] |
The values of the fields More... | |
int | Count [get] |
The number of fields in this field set More... | |
bool | HasNames [get] |
Whether the field set has named fields More... | |
CultureInfo | Culture [get, set] |
The culture to use to parse numbers and dates. More... | |
string | DatePattern [get, set] |
The date pattern for formatting. More... | |
Properties inherited from Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet | |
int | Count [get] |
The number of fields in this field set. More... | |
bool | HasNames [get] |
Whether the field set has named fields. More... | |
string[] | Names [get] |
The names of the fields. More... | |
string[] | Values [get] |
The values of the fields. More... | |
Detailed Description
Default implementation of IFieldSet.
Constructor & Destructor Documentation
Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.DefaultFieldSet | ( | string[] | values | ) |
Creates a DefaultFieldSet with the specified values.
- Parameters
-
values an array containing the values of the fields
Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.DefaultFieldSet | ( | string[] | names, |
string[] | values | ||
) |
Creates a DefaultFieldSet with the specified names and values.
- Parameters
-
names an array containing the names of the fields values an array containing the values of the fields
- Exceptions
-
ArgumentException if names and values do not have the same length
Member Function Documentation
bool Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadBoolean | ( | int | index, |
string | trueValue = "true" |
||
) |
Reads a field as a boolean.
- Parameters
-
index the index of the field to read trueValue the literal corresponding to true (default is "true"
)
- Returns
- true if the field contains trueValue, false otherwise
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
bool Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadBoolean | ( | string | name, |
string | trueValue = "true" |
||
) |
Reads a field as a boolean.
- Parameters
-
name the name of the field to read trueValue the literal corresponding to true (default is "true"
)
- Returns
- true if the field contains trueValue, false otherwise
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
byte Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadByte | ( | int | index | ) |
Reads a field as a byte.
- Parameters
-
index the index of the field to read
- Returns
- the read byte
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
byte Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadByte | ( | string | name | ) |
Reads a field as a byte.
- Parameters
-
name the name of the field to read
- Returns
- the read byte
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
char Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadChar | ( | int | index | ) |
Reads a field as a character.
- Parameters
-
index the index of the field to read
- Returns
- the read character
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
char Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadChar | ( | string | name | ) |
Reads a field as a character.
- Parameters
-
name the name of the field to read
- Returns
- the read character
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | int | index | ) |
Reads a field as a date.
- Parameters
-
index the index of the field to read
- Returns
- the read date
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | string | name | ) |
Reads a field as a date.
- Parameters
-
name the name of the field to read
- Returns
- the read date
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | int | index, |
DateTime | defaultValue | ||
) |
Reads a field as a date.
- Parameters
-
index the index of the field to read defaultValue the default value if the field is blank
- Returns
- the read date
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | string | name, |
DateTime | defaultValue | ||
) |
Reads a field as a date.
- Parameters
-
name the name of the field to read defaultValue the default value if the field is blank
- Returns
- the read date
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | int | index, |
string | pattern | ||
) |
Reads a field as a date.
- Parameters
-
index the index of the field to read pattern the pattern to use to parse the date
- Returns
- the read date
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | string | name, |
string | pattern | ||
) |
Reads a field as a date.
- Parameters
-
name the name of the field to read pattern the pattern to use to parse the date
- Returns
- the read date
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | int | index, |
string | pattern, | ||
DateTime | defaultValue | ||
) |
Reads a field as a date, using defaultValue if needed.
- Parameters
-
index pattern defaultValue
- Returns
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
DateTime Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDate | ( | string | name, |
string | pattern, | ||
DateTime | defaultValue | ||
) |
Reads a field as a date.
- Parameters
-
name the name of the field to read pattern the pattern to use to parse the date defaultValue the default value if the field is blank
- Returns
- the read date
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
decimal Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDecimal | ( | int | index | ) |
Reads a field as a decimal.
- Parameters
-
index the index of the field to read
- Returns
- the read decimal
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
decimal Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDecimal | ( | string | name | ) |
Reads a field as a decimal.
- Parameters
-
name the name of the field to read
- Returns
- the read decimal
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
decimal Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDecimal | ( | int | index, |
decimal | defaultValue | ||
) |
Reads a field as a decimal.
- Parameters
-
index the index of the field to read defaultValue the default value if the field is blank
- Returns
- the read decimal
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
decimal Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDecimal | ( | string | name, |
decimal | defaultValue | ||
) |
Reads a field as a decimal.
- Parameters
-
name the name of the field to read defaultValue the default value if the field is blank
- Returns
- the read decimal
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
double Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDouble | ( | int | index | ) |
Reads a field as a double.
- Parameters
-
index the index of the field to read
- Returns
- the read double
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
double Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadDouble | ( | string | name | ) |
Reads a field as a double.
- Parameters
-
name the name of the field to read
- Returns
- the read double
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
float Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadFloat | ( | int | index | ) |
Reads a field as a float.
- Parameters
-
index the index of the field to read
- Returns
- the read float
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
float Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadFloat | ( | string | name | ) |
Reads a field as a float.
- Parameters
-
name the name of the field to read
- Returns
- the read float
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
int Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadInt | ( | int | index | ) |
Reads a field as an int.
- Parameters
-
index the index of the field to read
- Returns
- the read int
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
int Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadInt | ( | string | name | ) |
Reads a field as an int.
- Parameters
-
name the name of the field to read
- Returns
- the read int
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
int Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadInt | ( | int | index, |
int | defaultValue | ||
) |
Reads a field as an int.
- Parameters
-
index the index of the field to read defaultValue the default value if the field is blank
- Returns
- the read int
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
int Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadInt | ( | string | name, |
int | defaultValue | ||
) |
Reads a field as an int.
- Parameters
-
name the name of the field to read defaultValue the default value if the field is blank
- Returns
- the read int
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
long Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadLong | ( | int | index | ) |
Reads a field as a long.
- Parameters
-
index the index of the field to read
- Returns
- the read long
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
long Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadLong | ( | string | name | ) |
Reads a field as a long.
- Parameters
-
name the name of the field to read
- Returns
- the read long
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
long Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadLong | ( | int | index, |
long | defaultValue | ||
) |
Reads a field as a long.
- Parameters
-
index the index of the field to read defaultValue the default value if the field is blank
- Returns
- the read long
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
long Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadLong | ( | string | name, |
long | defaultValue | ||
) |
Reads a field as a long.
- Parameters
-
name the name of the field to read defaultValue the default value if the field is blank
- Returns
- the read long
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
string Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadRawString | ( | int | index | ) |
Reads a field as a string.
- Parameters
-
index the index of the field to read
- Returns
- the raw content of the field
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
string Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadRawString | ( | string | name | ) |
Reads a field as a string.
- Parameters
-
name the name of the field to read
- Returns
- the raw content of the field
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
short Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadShort | ( | int | index | ) |
Reads a field as a short.
- Parameters
-
index the index of the field to read
- Returns
- the read short
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
short Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadShort | ( | string | name | ) |
Reads a field as a short.
- Parameters
-
name the name of the field to read
- Returns
- the read short
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
string Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadString | ( | int | index | ) |
Reads a field as a string.
- Parameters
-
index the index of the field to read
- Returns
- the trimmed content of the field
- Exceptions
-
ArgumentOutOfRangeException if the index does not correspond to a field
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
string Summer.Batch.Infrastructure.Item.File.Transform.DefaultFieldSet.ReadString | ( | string | name | ) |
Reads a field as a string.
- Parameters
-
name the name of the field to read
- Returns
- the trimmed content of the field
- Exceptions
-
ArgumentException if no field has the given name
Implements Summer.Batch.Infrastructure.Item.File.Transform.IFieldSet.
Property Documentation
|
get |
The number of fields in this field set
|
getset |
The culture to use to parse numbers and dates.
|
getset |
The date pattern for formatting.
|
get |
Whether the field set has named fields
|
get |
The names of the fields
|
get |
The values of the fields
The documentation for this class was generated from the following file:
- Summer.Batch.Infrastructure/Item/File/Transform/DefaultFieldSet.cs