refactor: Remove hardcoded csv path from ReplayFutureLiveBBOStream
Add constructor overload to accept an input ViewStream
This commit is contained in:
1 parent
fb15b3fb24
commit
e7625341e3
3 files changed
+48
-15
No files matched your search
@@ -211,6 +211,12 @@ namespace BCG {
|
||||
return tsNanos.HasValue ? DateTime.UnixEpoch.Add(new TimeSpan(tsNanos.Value / 100)) : null;
|
||||
}
|
||||
|
||||
public static DateTime? GetDateTime(this IBlueRow row, string colName) =>
|
||||
GetDateTime(row[colName]);
|
||||
|
||||
public static DateTime? GetDateTime(this IBlueRow row, int colNo) =>
|
||||
GetDateTime(row[colNo]);
|
||||
|
||||
public static DateTime? GetDateTime(object obj) {
|
||||
var res = _get_datetime_value(obj, DateTime.MinValue);
|
||||
if (res == DateTime.MinValue) {
|
||||
|
||||
@@ -107,10 +107,13 @@ public class BlueTableImmutable : IBlueRowCollection, IImmutableRowCollection {
|
||||
}
|
||||
}
|
||||
|
||||
public DataPacket ToDataPacket(bool reset = true) {
|
||||
public DataPacket ToDataPacket(bool reset = true) =>
|
||||
ToDataPacket(out _, reset);
|
||||
|
||||
public DataPacket ToDataPacket(out BlueTableImmutable newRows, bool reset = true) {
|
||||
table.RemoveRange(removed);
|
||||
table.AddRange(added);
|
||||
var newRows = new BlueTableImmutable(schema, table.ToImmutable());
|
||||
newRows = new BlueTableImmutable(schema, table.ToImmutable());
|
||||
var addedRows = new BlueTableImmutable(schema, added.ToImmutable());
|
||||
var removedRows = new BlueTableImmutable(schema, removed.ToImmutable());
|
||||
if (reset) {
|
||||
@@ -365,10 +368,13 @@ public class BlueTableImmutableAdapter<T> : IBlueRowCollection<BlueRowAdapter<T>
|
||||
}
|
||||
}
|
||||
|
||||
public IDataPacket<BlueRowAdapter<T>> ToDataPacket(bool reset = true) {
|
||||
public IDataPacket<BlueRowAdapter<T>> ToDataPacket(bool reset = true) =>
|
||||
ToDataPacket(out _, reset);
|
||||
|
||||
public IDataPacket<BlueRowAdapter<T>> ToDataPacket(out BlueTableImmutableAdapter<T> newRows, bool reset = true) {
|
||||
table.RemoveRange(removed);
|
||||
table.AddRange(added);
|
||||
var newRows = new BlueTableImmutableAdapter<T>(schemaAdapter, table.ToImmutable());
|
||||
newRows = new BlueTableImmutableAdapter<T>(schemaAdapter, table.ToImmutable());
|
||||
var addedRows = new BlueTableImmutableAdapter<T>(schemaAdapter, added.ToImmutable());
|
||||
var removedRows = new BlueTableImmutableAdapter<T>(schemaAdapter, removed.ToImmutable());
|
||||
if (reset) {
|
||||
|
||||
Reference in new issue
Block a user