DataStreamer
Overview
This provides the abstract base class streamers for serialization and deserialization of deltas and data in Data Abstract.
You will use one of the concrete implementations of this class (such as the BinDataStreamer in your application. You can also derive your own descendants of DataStreamer to implement a custom streaming format.
Location
- Reference: RemObjects.DataAbstract.dll
- Namespace: RemObjects.DataAbstract
- Ancestry: BaseComponent | DataStreamer
constructor protected
constructor
DataStreamer()
Sub New()
constructor (IContainer) protected
constructor(container: IContainer)
DataStreamer(IContainer container)
Sub New(container As IContainer)
Parameters:
- container:
constructor (Stream, StreamerInitialization) protected
constructor(dataStream: Stream; mode: StreamerInitialization)
DataStreamer(Stream dataStream, StreamerInitialization mode)
Sub New(dataStream As Stream, mode As StreamerInitialization)
Parameters:
- dataStream:
- mode:
BeginWriteDataReader
method BeginWriteDataReader(tableSchema: SchemaDataTable; fields: array of String; maxRecords: Int32; includeSchema: Boolean): DataForAppend
DataForAppend BeginWriteDataReader(SchemaDataTable tableSchema, String[] fields, Int32 maxRecords, Boolean includeSchema)
Function BeginWriteDataReader(tableSchema As SchemaDataTable, fields As String(), maxRecords As Int32, includeSchema As Boolean) As DataForAppend
Parameters:
- tableSchema:
- fields:
- maxRecords:
- includeSchema:
CountElements
method CountElements(elementType: StreamElementType): Int32
Int32 CountElements(StreamElementType elementType)
Function CountElements(elementType As StreamElementType) As Int32
Parameters:
- elementType:
DataReaderNeedsSchema
property DataReaderNeedsSchema: Boolean read;
Boolean DataReaderNeedsSchema { get; }
ReadOnly Property DataReaderNeedsSchema() As Boolean
Dispose protected
method Dispose(disposing: Boolean)
void Dispose(Boolean disposing)
Sub Dispose(disposing As Boolean)
Parameters:
- disposing:
Elements
property Elements: Dictionary<String, StreamElementInfo> read;
Dictionary<String, StreamElementInfo> Elements { get; }
ReadOnly Property Elements() As Dictionary<String, StreamElementInfo>
EndWriteDataReader
method EndWriteDataReader(data: DataForAppend): Int32
Int32 EndWriteDataReader(DataForAppend data)
Function EndWriteDataReader(data As DataForAppend) As Int32
Parameters:
- data:
FinalizeStreamer
Finalize the read/writing of data. This method should be called after all elements are written or when reading is complete.
method FinalizeStreamer
void FinalizeStreamer()
Sub FinalizeStreamer()
GetDataReader
method GetDataReader(tableName: String): IDataReader
IDataReader GetDataReader(String tableName)
Function GetDataReader(tableName As String) As IDataReader
Parameters:
- tableName:
GetLoggedDeltaFields protected
class method GetLoggedDeltaFields(delta: Delta; out fields: SchemaField; out mapping: Int32)
static void GetLoggedDeltaFields(Delta delta, out SchemaField fields, out Int32 mapping)
Shared Sub GetLoggedDeltaFields(delta As Delta, <OutAttribute> ByRef fields As SchemaField, <OutAttribute> ByRef mapping As Int32)
Parameters:
- delta:
- fields:
- mapping:
InitializationMode protected
property InitializationMode: StreamerInitialization read;
StreamerInitialization InitializationMode { get; }
ReadOnly Property InitializationMode() As StreamerInitialization
InitializeStreamer
method InitializeStreamer(dataStream: Stream; mode: StreamerInitialization)
void InitializeStreamer(Stream dataStream, StreamerInitialization mode)
Sub InitializeStreamer(dataStream As Stream, mode As StreamerInitialization)
Parameters:
- dataStream:
- mode:
ItemExistInArray protected
class method ItemExistInArray(data: array of String; item: String): Boolean
static Boolean ItemExistInArray(String[] data, String item)
Shared Function ItemExistInArray(data As String(), item As String) As Boolean
Parameters:
- data:
- item:
ListElements
Returns all elements in the stream that have their ElementType matching the given parameter.
method ListElements(elementType: StreamElementType): List<StreamElementInfo>
List<StreamElementInfo> ListElements(StreamElementType elementType)
Function ListElements(elementType As StreamElementType) As List<StreamElementInfo>
Parameters:
- elementType:
NeedIncludeValuesToStream protected
class method NeedIncludeValuesToStream(oldValue: Object; newValue: Object; isReducedDelta: Boolean; isPrimaryKey: Boolean; out includeOld: Boolean; out includeNew: Boolean)
static void NeedIncludeValuesToStream(Object oldValue, Object newValue, Boolean isReducedDelta, Boolean isPrimaryKey, out Boolean includeOld, out Boolean includeNew)
Shared Sub NeedIncludeValuesToStream(oldValue As Object, newValue As Object, isReducedDelta As Boolean, isPrimaryKey As Boolean, <OutAttribute> ByRef includeOld As Boolean, <OutAttribute> ByRef includeNew As Boolean)
Parameters:
- oldValue:
- newValue:
- isReducedDelta:
- isPrimaryKey:
- includeOld:
- includeNew:
ReadDataTable (Stream, String, DataTable)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable)
Parameters:
- dataStream:
- tableName:
- destination:
ReadDataTable (Stream, String, DataTable, Boolean)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable; applySchema: Boolean)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination, Boolean applySchema)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable, applySchema As Boolean)
Parameters:
- dataStream:
- tableName:
- destination:
- applySchema:
ReadDataTable (Stream, String, DataTable, Boolean, Boolean)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable; applySchema: Boolean; loadRecords: Boolean)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination, Boolean applySchema, Boolean loadRecords)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable, applySchema As Boolean, loadRecords As Boolean)
Parameters:
- dataStream:
- tableName:
- destination:
- applySchema:
- loadRecords:
ReadDataTable (String, DataTable, Boolean, Boolean)
method ReadDataTable(tableName: String; destination: DataTable; applySchema: Boolean; loadData: Boolean)
void ReadDataTable(String tableName, DataTable destination, Boolean applySchema, Boolean loadData)
Sub ReadDataTable(tableName As String, destination As DataTable, applySchema As Boolean, loadData As Boolean)
Parameters:
- tableName:
- destination:
- applySchema:
- loadData:
ReadDataTableSchema
Reads the schema of a DataTable and returns it.
method ReadDataTableSchema(tableName: String): SchemaDataTable
SchemaDataTable ReadDataTableSchema(String tableName)
Function ReadDataTableSchema(tableName As String) As SchemaDataTable
Parameters:
- tableName:
ReadDelta (Delta)
This method will return a delta from the stream. If there is no delta by the name passed it will throw an exception.
method ReadDelta(destination: Delta)
void ReadDelta(Delta destination)
Sub ReadDelta(destination As Delta)
Parameters:
- destination:
ReadDelta (Schema, String): Delta
method ReadDelta(schema: Schema; tableName: String): Delta
Delta ReadDelta(Schema schema, String tableName)
Function ReadDelta(schema As Schema, tableName As String) As Delta
Parameters:
- schema:
- tableName:
StreamType
property StreamType: StreamType read;
StreamType StreamType { get; }
ReadOnly Property StreamType() As StreamType
WriteDataReader (IDataReader, SchemaDataTable)
Writes the contents of a DataReader and the associated schema to the stream.
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable)
Parameters:
- reader:
- tableSchema:
WriteDataReader (IDataReader, SchemaDataTable, array of String, Int32, Boolean, SchemaColumnMappingCollection)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; fields: array of String; maxRecords: Int32; includeSchema: Boolean; columnMapping: SchemaColumnMappingCollection)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, String[] fields, Int32 maxRecords, Boolean includeSchema, SchemaColumnMappingCollection columnMapping)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, fields As String(), maxRecords As Int32, includeSchema As Boolean, columnMapping As SchemaColumnMappingCollection)
Parameters:
- reader:
- tableSchema:
- fields:
- maxRecords:
- includeSchema:
- columnMapping:
WriteDataReader (IDataReader, SchemaDataTable, Int32)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; maxRecords: Int32)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, Int32 maxRecords)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, maxRecords As Int32)
Parameters:
- reader:
- tableSchema:
- maxRecords:
WriteDataReader (IDataReader, SchemaDataTable, Int32, Boolean)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; maxRecords: Int32; includeSchema: Boolean)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, Int32 maxRecords, Boolean includeSchema)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, maxRecords As Int32, includeSchema As Boolean)
Parameters:
- reader:
- tableSchema:
- maxRecords:
- includeSchema:
WriteDataReaderData
method WriteDataReaderData(reader: IDataReader; columnMapping: SchemaColumnMappingCollection; data: DataForAppend; unionSource: Int32): Int32
Int32 WriteDataReaderData(IDataReader reader, SchemaColumnMappingCollection columnMapping, DataForAppend data, Int32 unionSource)
Function WriteDataReaderData(reader As IDataReader, columnMapping As SchemaColumnMappingCollection, data As DataForAppend, unionSource As Int32) As Int32
Parameters:
- reader:
- columnMapping:
- data:
- unionSource:
WriteDataTable (DataTable, SchemaDataTable)
Writes a DataTable to the stream. This method will throw an exception if a DataTable by the same name already exists on the stream.
method WriteDataTable(table: DataTable; tableSchema: SchemaDataTable)
void WriteDataTable(DataTable table, SchemaDataTable tableSchema)
Sub WriteDataTable(table As DataTable, tableSchema As SchemaDataTable)
Parameters:
- table:
- tableSchema:
WriteDataTable (DataTable, SchemaDataTable, Int32, Boolean)
method WriteDataTable(table: DataTable; tableSchema: SchemaDataTable; maxRecords: Int32; includeSchema: Boolean)
void WriteDataTable(DataTable table, SchemaDataTable tableSchema, Int32 maxRecords, Boolean includeSchema)
Sub WriteDataTable(table As DataTable, tableSchema As SchemaDataTable, maxRecords As Int32, includeSchema As Boolean)
Parameters:
- table:
- tableSchema:
- maxRecords:
- includeSchema:
WriteDelta (Delta)
Parameters:
- delta:
WriteDelta (Delta, Boolean)
method WriteDelta(delta: Delta; dynamicSelect: Boolean)
void WriteDelta(Delta delta, Boolean dynamicSelect)
Sub WriteDelta(delta As Delta, dynamicSelect As Boolean)
Parameters:
- delta:
- dynamicSelect:
WriteDelta (DataTable, Boolean): Delta
This method will write a delta to the stream. If there already is a delta by this name it will throw an exception.
method WriteDelta(table: DataTable; dynamicSelect: Boolean): Delta
Delta WriteDelta(DataTable table, Boolean dynamicSelect)
Function WriteDelta(table As DataTable, dynamicSelect As Boolean) As Delta
Parameters:
- table:
- dynamicSelect:
DataReaderNeedsSchema
property DataReaderNeedsSchema: Boolean read;
Boolean DataReaderNeedsSchema { get; }
ReadOnly Property DataReaderNeedsSchema() As Boolean
Elements
property Elements: Dictionary<String, StreamElementInfo> read;
Dictionary<String, StreamElementInfo> Elements { get; }
ReadOnly Property Elements() As Dictionary<String, StreamElementInfo>
InitializationMode protected
property InitializationMode: StreamerInitialization read;
StreamerInitialization InitializationMode { get; }
ReadOnly Property InitializationMode() As StreamerInitialization
StreamType
property StreamType: StreamType read;
StreamType StreamType { get; }
ReadOnly Property StreamType() As StreamType
GetLoggedDeltaFields protected
class method GetLoggedDeltaFields(delta: Delta; out fields: SchemaField; out mapping: Int32)
static void GetLoggedDeltaFields(Delta delta, out SchemaField fields, out Int32 mapping)
Shared Sub GetLoggedDeltaFields(delta As Delta, <OutAttribute> ByRef fields As SchemaField, <OutAttribute> ByRef mapping As Int32)
Parameters:
- delta:
- fields:
- mapping:
ItemExistInArray protected
class method ItemExistInArray(data: array of String; item: String): Boolean
static Boolean ItemExistInArray(String[] data, String item)
Shared Function ItemExistInArray(data As String(), item As String) As Boolean
Parameters:
- data:
- item:
NeedIncludeValuesToStream protected
class method NeedIncludeValuesToStream(oldValue: Object; newValue: Object; isReducedDelta: Boolean; isPrimaryKey: Boolean; out includeOld: Boolean; out includeNew: Boolean)
static void NeedIncludeValuesToStream(Object oldValue, Object newValue, Boolean isReducedDelta, Boolean isPrimaryKey, out Boolean includeOld, out Boolean includeNew)
Shared Sub NeedIncludeValuesToStream(oldValue As Object, newValue As Object, isReducedDelta As Boolean, isPrimaryKey As Boolean, <OutAttribute> ByRef includeOld As Boolean, <OutAttribute> ByRef includeNew As Boolean)
Parameters:
- oldValue:
- newValue:
- isReducedDelta:
- isPrimaryKey:
- includeOld:
- includeNew:
constructor protected
constructor
DataStreamer()
Sub New()
constructor (IContainer) protected
constructor(container: IContainer)
DataStreamer(IContainer container)
Sub New(container As IContainer)
Parameters:
- container:
constructor (Stream, StreamerInitialization) protected
constructor(dataStream: Stream; mode: StreamerInitialization)
DataStreamer(Stream dataStream, StreamerInitialization mode)
Sub New(dataStream As Stream, mode As StreamerInitialization)
Parameters:
- dataStream:
- mode:
BeginWriteDataReader
method BeginWriteDataReader(tableSchema: SchemaDataTable; fields: array of String; maxRecords: Int32; includeSchema: Boolean): DataForAppend
DataForAppend BeginWriteDataReader(SchemaDataTable tableSchema, String[] fields, Int32 maxRecords, Boolean includeSchema)
Function BeginWriteDataReader(tableSchema As SchemaDataTable, fields As String(), maxRecords As Int32, includeSchema As Boolean) As DataForAppend
Parameters:
- tableSchema:
- fields:
- maxRecords:
- includeSchema:
CountElements
method CountElements(elementType: StreamElementType): Int32
Int32 CountElements(StreamElementType elementType)
Function CountElements(elementType As StreamElementType) As Int32
Parameters:
- elementType:
Dispose protected
method Dispose(disposing: Boolean)
void Dispose(Boolean disposing)
Sub Dispose(disposing As Boolean)
Parameters:
- disposing:
EndWriteDataReader
method EndWriteDataReader(data: DataForAppend): Int32
Int32 EndWriteDataReader(DataForAppend data)
Function EndWriteDataReader(data As DataForAppend) As Int32
Parameters:
- data:
FinalizeStreamer
Finalize the read/writing of data. This method should be called after all elements are written or when reading is complete.
method FinalizeStreamer
void FinalizeStreamer()
Sub FinalizeStreamer()
GetDataReader
method GetDataReader(tableName: String): IDataReader
IDataReader GetDataReader(String tableName)
Function GetDataReader(tableName As String) As IDataReader
Parameters:
- tableName:
InitializeStreamer
method InitializeStreamer(dataStream: Stream; mode: StreamerInitialization)
void InitializeStreamer(Stream dataStream, StreamerInitialization mode)
Sub InitializeStreamer(dataStream As Stream, mode As StreamerInitialization)
Parameters:
- dataStream:
- mode:
ListElements
Returns all elements in the stream that have their ElementType matching the given parameter.
method ListElements(elementType: StreamElementType): List<StreamElementInfo>
List<StreamElementInfo> ListElements(StreamElementType elementType)
Function ListElements(elementType As StreamElementType) As List<StreamElementInfo>
Parameters:
- elementType:
ReadDataTable (Stream, String, DataTable)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable)
Parameters:
- dataStream:
- tableName:
- destination:
ReadDataTable (Stream, String, DataTable, Boolean)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable; applySchema: Boolean)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination, Boolean applySchema)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable, applySchema As Boolean)
Parameters:
- dataStream:
- tableName:
- destination:
- applySchema:
ReadDataTable (Stream, String, DataTable, Boolean, Boolean)
method ReadDataTable(dataStream: Stream; tableName: String; destination: DataTable; applySchema: Boolean; loadRecords: Boolean)
void ReadDataTable(Stream dataStream, String tableName, DataTable destination, Boolean applySchema, Boolean loadRecords)
Sub ReadDataTable(dataStream As Stream, tableName As String, destination As DataTable, applySchema As Boolean, loadRecords As Boolean)
Parameters:
- dataStream:
- tableName:
- destination:
- applySchema:
- loadRecords:
ReadDataTable (String, DataTable, Boolean, Boolean)
method ReadDataTable(tableName: String; destination: DataTable; applySchema: Boolean; loadData: Boolean)
void ReadDataTable(String tableName, DataTable destination, Boolean applySchema, Boolean loadData)
Sub ReadDataTable(tableName As String, destination As DataTable, applySchema As Boolean, loadData As Boolean)
Parameters:
- tableName:
- destination:
- applySchema:
- loadData:
ReadDataTableSchema
Reads the schema of a DataTable and returns it.
method ReadDataTableSchema(tableName: String): SchemaDataTable
SchemaDataTable ReadDataTableSchema(String tableName)
Function ReadDataTableSchema(tableName As String) As SchemaDataTable
Parameters:
- tableName:
ReadDelta (Delta)
This method will return a delta from the stream. If there is no delta by the name passed it will throw an exception.
method ReadDelta(destination: Delta)
void ReadDelta(Delta destination)
Sub ReadDelta(destination As Delta)
Parameters:
- destination:
ReadDelta (Schema, String): Delta
method ReadDelta(schema: Schema; tableName: String): Delta
Delta ReadDelta(Schema schema, String tableName)
Function ReadDelta(schema As Schema, tableName As String) As Delta
Parameters:
- schema:
- tableName:
WriteDataReader (IDataReader, SchemaDataTable)
Writes the contents of a DataReader and the associated schema to the stream.
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable)
Parameters:
- reader:
- tableSchema:
WriteDataReader (IDataReader, SchemaDataTable, array of String, Int32, Boolean, SchemaColumnMappingCollection)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; fields: array of String; maxRecords: Int32; includeSchema: Boolean; columnMapping: SchemaColumnMappingCollection)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, String[] fields, Int32 maxRecords, Boolean includeSchema, SchemaColumnMappingCollection columnMapping)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, fields As String(), maxRecords As Int32, includeSchema As Boolean, columnMapping As SchemaColumnMappingCollection)
Parameters:
- reader:
- tableSchema:
- fields:
- maxRecords:
- includeSchema:
- columnMapping:
WriteDataReader (IDataReader, SchemaDataTable, Int32)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; maxRecords: Int32)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, Int32 maxRecords)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, maxRecords As Int32)
Parameters:
- reader:
- tableSchema:
- maxRecords:
WriteDataReader (IDataReader, SchemaDataTable, Int32, Boolean)
method WriteDataReader(reader: IDataReader; tableSchema: SchemaDataTable; maxRecords: Int32; includeSchema: Boolean)
void WriteDataReader(IDataReader reader, SchemaDataTable tableSchema, Int32 maxRecords, Boolean includeSchema)
Sub WriteDataReader(reader As IDataReader, tableSchema As SchemaDataTable, maxRecords As Int32, includeSchema As Boolean)
Parameters:
- reader:
- tableSchema:
- maxRecords:
- includeSchema:
WriteDataReaderData
method WriteDataReaderData(reader: IDataReader; columnMapping: SchemaColumnMappingCollection; data: DataForAppend; unionSource: Int32): Int32
Int32 WriteDataReaderData(IDataReader reader, SchemaColumnMappingCollection columnMapping, DataForAppend data, Int32 unionSource)
Function WriteDataReaderData(reader As IDataReader, columnMapping As SchemaColumnMappingCollection, data As DataForAppend, unionSource As Int32) As Int32
Parameters:
- reader:
- columnMapping:
- data:
- unionSource:
WriteDataTable (DataTable, SchemaDataTable)
Writes a DataTable to the stream. This method will throw an exception if a DataTable by the same name already exists on the stream.
method WriteDataTable(table: DataTable; tableSchema: SchemaDataTable)
void WriteDataTable(DataTable table, SchemaDataTable tableSchema)
Sub WriteDataTable(table As DataTable, tableSchema As SchemaDataTable)
Parameters:
- table:
- tableSchema:
WriteDataTable (DataTable, SchemaDataTable, Int32, Boolean)
method WriteDataTable(table: DataTable; tableSchema: SchemaDataTable; maxRecords: Int32; includeSchema: Boolean)
void WriteDataTable(DataTable table, SchemaDataTable tableSchema, Int32 maxRecords, Boolean includeSchema)
Sub WriteDataTable(table As DataTable, tableSchema As SchemaDataTable, maxRecords As Int32, includeSchema As Boolean)
Parameters:
- table:
- tableSchema:
- maxRecords:
- includeSchema:
WriteDelta (Delta)
Parameters:
- delta:
WriteDelta (Delta, Boolean)
method WriteDelta(delta: Delta; dynamicSelect: Boolean)
void WriteDelta(Delta delta, Boolean dynamicSelect)
Sub WriteDelta(delta As Delta, dynamicSelect As Boolean)
Parameters:
- delta:
- dynamicSelect:
WriteDelta (DataTable, Boolean): Delta
This method will write a delta to the stream. If there already is a delta by this name it will throw an exception.
method WriteDelta(table: DataTable; dynamicSelect: Boolean): Delta
Delta WriteDelta(DataTable table, Boolean dynamicSelect)
Function WriteDelta(table As DataTable, dynamicSelect As Boolean) As Delta
Parameters:
- table:
- dynamicSelect: