C# 클래스 BExIS.IO.Transform.Input.AsciiReader

this class is used to read and validate ascii files
상속: DataReader
파일 보기 프로젝트 열기: BEXIS2/Core 1 사용 예제들

공개 메소드들

메소드 설명
ReadFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId ) : List

Read the whole FileStream line by line until no more come. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples

ReadFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId, int packageSize ) : List

Read line by line based on a packageSize. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples

ReadFile ( Stream file, AsciiFileReaderInfo fri ) : List>
ReadValuesFromFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId, List variableList, int packageSize ) : List>

Get all values from the FileStream of each variable in variable list

ValidateFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId ) : void

Validate the whole FileStream line by line until no more come. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples

A list of errorMessages is filled when the fil is not valid

보호된 메소드들

메소드 설명
ValidateDatastructure ( string line, char sep ) : bool

Validate the datastructure

비공개 메소드들

메소드 설명
convertAndAddToSubmitedVariableIdentifier ( ) : void

Convert a list of variable names to VariableIdentifiers

rowToList ( string line, char seperator ) : List

Convert a row as a string to a list of strings

textMarkerHandling ( string row, char separator, char textmarker ) : List

If a seperator is present in a text which is highlighted with highlighter (bsp quotes), which is a special case which is treated in this function

메소드 상세

ReadFile() 공개 메소드

Read the whole FileStream line by line until no more come. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples
public ReadFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId ) : List
file Stream
fileName string name of the FileStream
fri AsciiFileReaderInfo AsciiFileReaderInfo needed
sds BExIS.Dlm.Entities.DataStructure.StructuredDataStructure StructuredDataStructure
datasetId long Id of the dataset
리턴 List

ReadFile() 공개 메소드

Read line by line based on a packageSize. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples
public ReadFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId, int packageSize ) : List
file Stream
fileName string name of the FileStream
fri AsciiFileReaderInfo AsciiFileReaderInfo needed
sds BExIS.Dlm.Entities.DataStructure.StructuredDataStructure StructuredDataStructure
datasetId long Id of the dataset
packageSize int
리턴 List

ReadFile() 공개 메소드

public ReadFile ( Stream file, AsciiFileReaderInfo fri ) : List>
file Stream
fri AsciiFileReaderInfo
리턴 List>

ReadValuesFromFile() 공개 메소드

Get all values from the FileStream of each variable in variable list
public ReadValuesFromFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId, List variableList, int packageSize ) : List>
file Stream
fileName string name of the FileStream
fri AsciiFileReaderInfo AsciiFileReaderInfo needed
sds BExIS.Dlm.Entities.DataStructure.StructuredDataStructure StructuredDataStructure
datasetId long Id of the dataset
variableList List List of variables
packageSize int size of a package
리턴 List>

ValidateDatastructure() 보호된 메소드

Validate the datastructure
protected ValidateDatastructure ( string line, char sep ) : bool
line string line which include the datastructure as names
sep char TextSeparator as Character
리턴 bool

ValidateFile() 공개 메소드

Validate the whole FileStream line by line until no more come. Convert the lines into a datatuple based on the datastructure. Return value is a list of datatuples
A list of errorMessages is filled when the fil is not valid
public ValidateFile ( Stream file, string fileName, AsciiFileReaderInfo fri, StructuredDataStructure sds, long datasetId ) : void
file Stream
fileName string name of the FileStream
fri AsciiFileReaderInfo AsciiFileReaderInfo needed
sds BExIS.Dlm.Entities.DataStructure.StructuredDataStructure StructuredDataStructure
datasetId long Id of the dataset
리턴 void