IFileHelperAsyncEngineT Interface |
Namespace: FileHelpers
public interface IFileHelperAsyncEngine<T> : IEnumerable<T>, IEnumerable, IDisposable where T : class
The IFileHelperAsyncEngineT type exposes the following members.
Name | Description | |
---|---|---|
![]() | Encoding |
The encoding to Read and Write the streams.
Default is the system's current ANSI code page.
|
![]() | ErrorManager | This is a common class that manage the errors of the library. |
![]() | ErrorMode |
Indicates the behavior of the engine when it found an error.
(shortcut for ErrorManager.ErrorMode)
|
![]() | FooterText | The read footer in the last read operation. If any. |
![]() | HeaderText | The read header in the last read operation. If any. |
![]() ![]() | LastRecord | Contains the last Record read by the ReadNext method. |
![]() | LastRecordValues |
An array with the values of each field of the current record
|
![]() | LineNumber | The current line number. |
![]() | Options | Allows to change some record layout options at runtime |
![]() | RecordType | Returns the type of records handled by this engine. |
![]() | TotalRecords | The total numbers of records in the last read/written file
(only works with whole read/write). |
Name | Description | |
---|---|---|
![]() | BeginAppendToFile |
Open a file to Append to the end.
|
![]() ![]() | BeginReadFile |
Open a specified file and seek to the first record.
|
![]() ![]() | BeginReadStream |
Open a specified stream and seek to the first record.
|
![]() | BeginReadString | |
![]() ![]() | BeginWriteFile |
Open a file to write it.
If the file exists the engine will over write it
|
![]() ![]() | BeginWriteStream |
Set the stream to be used in the WriteNext(T) operation.
|
![]() ![]() | Close |
Close all opened stream readers and writers (if any).
|
![]() | Flush |
Save all the buffered data for write to the disk.
Useful with opened async engines when you want to save pending values to disk.
Expecially for engines used for logging.
|
![]() ![]() | ReadNext |
Reads the next record of a file.
|
![]() | ReadNexts |
Reads the specified number of records from a file or stream opened before.
|
![]() | ReadToEnd |
Read the file to the end, returning an array of records
|
![]() ![]() | WriteNext |
Write the next record to a file or stream opened.
|
![]() | WriteNexts |
Write the next records to a file or stream opened.
|
![]() | WriteNextValues |
Write the current record values in the buffer. You can use engine[0] or engine["YourField"] to set the values.
|
Name | Description | |
---|---|---|
![]() | AfterReadRecord | Called in read operations just after the record was created from a record string. |
![]() | AfterWriteRecord | Called in write operations just after the record was converted to a string. |
![]() | BeforeReadRecord | Called in read operations just before the record string is translated to a record. |
![]() | BeforeWriteRecord | Called in write operations just before the record is converted to a string to write it. |
![]() | Progress | Called to notify progress. |