<PackageReference Include="Relativity.Server.Import.SDK" Version="24000.1.1" />

DelimitedFileImporter2

public abstract class DelimitedFileImporter2 : IoReporter
Represents an abstract representation of a file importer that operates over delimited files.
public const int MaxColumnCountForLine = 10000

The maximum column count for line.

protected char Bound { get; }

Gets the bound character.

protected long CharacterPosition { get; }

Gets the current character position.

public int CurrentLineNumber { get; }

Gets the current line number.

protected char Delimiter { get; }

Gets the character delimiter.

protected virtual bool HasReachedEof { get; }

Gets a value indicating whether the importer has reached the end of file.

protected DelimitedMode Mode { get; }

Gets the delimited mode.

protected char NewlineProxy { get; }

Gets the newline proxy.

protected StreamReader Reader { get; protected set; }

Gets or sets the stream reader.

protected TrimOption TrimOption { get; protected set; }

Gets or sets the whitespace trim option.

protected virtual bool UseConcordanceStyleBoundStart { get; }

Gets a value indicating whether to use concordance style bound starts.

protected DelimitedFileImporter2(char delimiter, bool retry)

Initializes a new instance of the DelimitedFileImporter2 class.

protected DelimitedFileImporter2(char delimiter, char bound, char newlineProxy, bool retry)

Initializes a new instance of the DelimitedFileImporter2 class.

protected DelimitedFileImporter2(char delimiter, IoReporterContext context, ILog logger, CancellationToken token)

Initializes a new instance of the DelimitedFileImporter2 class.

protected DelimitedFileImporter2(char delimiter, char bound, char newlineProxy, IoReporterContext context, ILog logger, CancellationToken token)

Initializes a new instance of the DelimitedFileImporter2 class.

public static string ValidateStringForVarChar(string value, int column, int fieldLength, int currentLineNumber, string displayName)

Validates the string for variable character.

protected void AdvanceLine()

Advances the underlying file cursor to the next line without returning results.

public void Close()

Closes this importer.

public bool GetBoolean(string value)

Gets the boolean representation for the specified string value.

protected int GetChar(bool advance)

Gets the character.

public decimal GetDecimal(string value, int column)

Gets a decimal from the provided string.

protected string[] GetLine()

Gets the next line of the file as a string array.

protected string[] GetLine(int maximumFieldLength)

Gets the next line of the file as a string array.

public bool? GetNullableBoolean(string value, int column)

Gets the nullable boolean representation for the specified string value.

public DateTime? GetNullableDateTime(string value, int column)

Gets the nullable boolean representation for the specified string value.

public decimal? GetNullableDecimal(string value, int column)

Gets the nullable decimal representation for the specified string value.

public string GetNullableFixedString(string value, int column, int maxLength, string displayName)

Gets a fixed-length string the from the provided value.

public int? GetNullableInteger(string value, int column)

Gets a nullable integer from the provided string.

protected virtual decimal? ParseNullableDecimal(string value)

Gets a nullable decimal from the provided string.

public virtual int Peek()

Peeks at the next character of the file without advancing the underlying file cursor.

public abstract object ReadFile(string path)

Reads an entire file from the specified path.

public void ResetLineCounter()

Resets the current line being read to the first line of the file.

public void Rewind()

Resets this importer to the beginning of the file.