<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.2.1" />

kCura.Utility.DelimitedFileImporter

public abstract class DelimitedFileImporter : RobustIoReporter
Abstract representation of a file importer that operates over delimited files.

Represents an exception that occured while attempting to import a boolean.

Represents an exception that occured while attempting to import a date.

Represents an exception that occured while attempting to import a decimal.

public enum DelimMode

Enumerates the possible delimiter modes.

Represents an exception that occured while attempting to import a cell.

Represents an exception that occured while attempting to import an object name.

Represents an exception that occured while attempting to import a string.

Represents an exception that occured while attempting to import an integer.

Enumerates the different behaviors when stripping text of whitespace.

public const int MAXIMUM_COLUMN_COUNT_FOR_LINE = 10000

protected char Bound { get; }

Gets the configured bounding character.

protected char Delimiter { get; }

Gets the configured delimiter character.

protected bool DoRetryLogic { get; protected set; }

Indicates whether or not this importer should retry a read operation on failure.

protected bool HasReachedEOF { get; }

Indicates whether or not the end of the file has been reached.

public DelimMode Mode { get; }

Gets the configured delimiter mode.

protected char[] NewlineProxy { get; }

Gets the configured new line proxy character array.

protected StreamReader Reader { get; protected set; }

Gets the underlying stream reader.

protected virtual bool UseConcordanceStyleBoundStart { get; }

Indicates whether or not to use concordance style bound starts.

Gets or sets the whitespace stripping behavior type.

protected DelimitedFileImporter(char[] delimiter, char[] bound, char[] newLineProxy, bool doRetryLogic)

Initializes a new instance of DelimitedFileImporter with the provided parameters.

protected DelimitedFileImporter(string delimiter, string bound, string newLineProxy, bool doRetryLogic)

Initializes a new instance of DelimitedFileImporter with the provided parameters.

protected DelimitedFileImporter(char[] delimiter, bool doRetryLogic)

Initializes a new instance of DelimitedFileImporter with the provided parameters.

protected DelimitedFileImporter(string delimiter, bool doRetryLogic)

Initializes a new instance of DelimitedFileImporter with the provided parameters.

protected DelimitedFileImporter(bool doRetryLogic)

Initializes a new instance of DelimitedFileImporter with the provided parameters.

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 a boolean value from the provided string.

public DateTime GetDate(string value, int column)

Gets a date from the provided string.

public decimal GetDecimal(string value, int column)

Gets a decimal from the provided string.

public int GetInteger(string value, int column)

Gets an integer from the provided string.

protected string[] GetLine()

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

protected string[] GetLine(int maximumCellLength)

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

public string GetNullableAssociatedObjectName(string value, int column, int fieldLength, string fieldName)

Gets an object name string the from the provided value.

public bool? GetNullableBoolean(string value, int column)

Gets a nullable boolean value from the provided string.

public DateTime? GetNullableDateTime(string value, int column)

Gets a nullable date from the provided string.

public decimal? GetNullableDecimal(string value, int column)

public string GetNullableFixedString(string value, int column, int fieldLength, 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.

protected 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.