Click or drag to resize

MasterDetailEngine Class

Read a master detail file, eg Orders followed by detail records
Inheritance Hierarchy
SystemObject
  FileHelpersEngineBase
    FileHelpers.MasterDetailMasterDetailEngineObject, Object
      FileHelpers.MasterDetailMasterDetailEngine

Namespace:  FileHelpers.MasterDetail
Assembly:  FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntax
public sealed class MasterDetailEngine : MasterDetailEngine<Object, Object>

The MasterDetailEngine type exposes the following members.

Constructors
  NameDescription
Public methodMasterDetailEngine(Type, Type)
Initializes a new instance of the MasterDetailEngine class with the specified type of records.
Public methodMasterDetailEngine(Type, Type, MasterDetailSelector)
Initializes a new instance of the MasterDetailEngine class with the specified type of records.
Public methodMasterDetailEngine(Type, Type, CommonSelector, String)
Initializes a new instance of the MasterDetailEngine class with the specified type of records.
Top
Properties
  NameDescription
Public propertyEncoding
The encoding to Read and Write the streams. Default is the system's current ANSI code page.
(Inherited from EngineBase.)
Public propertyErrorManager
This is a common class that manages the errors of the library.
(Inherited from EngineBase.)
Public propertyErrorMode
Indicates the behavior of the engine when it finds an error. {Shortcut for )
(Inherited from EngineBase.)
Public propertyFooterText
The Read Footer in the last Read operation. If any.
(Inherited from EngineBase.)
Public propertyHeaderText
The Read Header in the last Read operation. If any.
(Inherited from EngineBase.)
Public propertyLineNumber
The current line number.
(Inherited from EngineBase.)
Public propertyMasterOptions
Allows you to change some record layout options at runtime
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public propertyMasterType
the type of the master records handled by this engine.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public propertyNewLineForWrite
Newline string to be used when engine writes to file. Default is the system's newline setting (System.Environment.NewLine).
(Inherited from EngineBase.)
Public propertyOptions
Allows you to change some record layout options at runtime
(Inherited from EngineBase.)
Public propertyRecordSelector
The MasterDetailSelector to get the RecordAction (only for read operations)
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public propertyRecordType
Returns the type of records handled by this engine.
(Inherited from EngineBase.)
Public propertyTotalRecords
The total numbers of records in the last read/written file (only works with whole read/write).
(Inherited from EngineBase.)
Top
Methods
  NameDescription
Public methodCode exampleAppendToFile(String, MasterDetailsTMaster, TDetail)
Append a record to the specified file.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleAppendToFile(String, IEnumerableMasterDetailsTMaster, TDetail)
Append an array of records to the specified file.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodGetFileHeader
Builds a line with the name of the fields, for a delimited files it uses the same delimiter, for a fixed length field it writes the fields names separated with tabs
(Inherited from EngineBase.)
Public methodCode exampleReadFile
Read a file and return an array of the contained records.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleReadStream
Read a Stream and return an array of the contained records.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodReadString
Read a String and return an array of the contained records.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleWriteFile(String, IEnumerableMasterDetailsTMaster, TDetail)
Write an array of records to the specified file.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleWriteFile(String, IEnumerableMasterDetailsTMaster, TDetail, Int32)
Write the specified number of records from the array to a file.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleWriteStream(TextWriter, IEnumerableMasterDetailsTMaster, TDetail)
Write an array of records to the specified Stream.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodCode exampleWriteStream(TextWriter, IEnumerableMasterDetailsTMaster, TDetail, Int32)
Write the specified number of records in the array to the Stream.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodWriteString(IEnumerableMasterDetailsTMaster, TDetail)
Write an array of records to an String and return it.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Public methodWriteString(IEnumerableMasterDetailsTMaster, TDetail, Int32)
Write an array of records to an String and return it.
(Inherited from MasterDetailEngineTMaster, TDetail.)
Top
Events
  NameDescription
Public eventProgress
Event handler called to notify progress.
(Inherited from EngineBase.)
Top
See Also