mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2025-01-04 03:00:20 +00:00
35 lines
751 B
C#
35 lines
751 B
C#
using System;
|
|
|
|
namespace FileHelpers
|
|
{
|
|
/// <summary>
|
|
/// This class allows you to set some options of the delimited records but at runtime.
|
|
/// With this options the library is more flexible than never.
|
|
/// </summary>
|
|
public sealed class DelimitedRecordOptions: RecordOptions
|
|
{
|
|
|
|
internal DelimitedRecordOptions(RecordInfo info)
|
|
:base(info)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// The delimiter used to identify each field in the data.
|
|
/// </summary>
|
|
public string Delimiter
|
|
{
|
|
get
|
|
{
|
|
return ((DelimitedField) mRecordInfo.mFields[0]).Separator;
|
|
}
|
|
set
|
|
{
|
|
for(int i = 0; i < mRecordInfo.mFieldCount ;i++)
|
|
((DelimitedField) mRecordInfo.mFields[i]).Separator = value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|