Add: metadata to dsl callback
This commit is contained in:
1 parent
1c75f4a53f
commit
4237d58f76
3 files changed
+35
-12
No files matched your search
@@ -52,6 +52,13 @@ namespace BCG {
|
||||
this.addedRows = addedRows;
|
||||
this.deletedRows = deletedRows;
|
||||
}
|
||||
public DataPacket(IBlueRowCollection newRows, IBlueRowCollection addedRows, IBlueRowCollection deletedRows,
|
||||
IDictionary<string, object> meta_data) {
|
||||
this.newRows = newRows;
|
||||
this.addedRows = addedRows;
|
||||
this.deletedRows = deletedRows;
|
||||
this.meta_data = meta_data != null ? new Dictionary<string, object>(meta_data) : null;
|
||||
}
|
||||
|
||||
IBlueRowCollection IDataPacket.newRows => newRows;
|
||||
IBlueRowCollection IDataPacket.addedRows => addedRows;
|
||||
@@ -246,25 +253,35 @@ namespace BCG {
|
||||
return new DataPacket(nt, at, dt);
|
||||
}
|
||||
|
||||
public DataPacket deepCopy() {
|
||||
return new DataPacket(new OrderedBlueTable(newRows),
|
||||
new OrderedBlueTable(newRows),
|
||||
new BlueTable(deletedRows));
|
||||
public object Clone() {
|
||||
var copy = (DataPacket)MemberwiseClone();
|
||||
if (meta_data != null)
|
||||
copy.meta_data = new Dictionary<string, object>(meta_data);
|
||||
return copy;
|
||||
}
|
||||
|
||||
public DataPacket deepCopy() {
|
||||
var copy = new DataPacket(
|
||||
new OrderedBlueTable(newRows),
|
||||
new OrderedBlueTable(addedRows),
|
||||
new BlueTable(deletedRows)
|
||||
);
|
||||
if (meta_data != null)
|
||||
copy.meta_data = new Dictionary<string, object>(meta_data);
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
public virtual DataPacket createImmutable() {
|
||||
return
|
||||
new DataPacket(
|
||||
newRows is IImmutableRowCollection ? newRows : new ImmutableBlueTable(newRows),
|
||||
addedRows,
|
||||
deletedRows);
|
||||
deletedRows, meta_data);
|
||||
}
|
||||
#region ICloneable Members
|
||||
|
||||
public object Clone() {
|
||||
return MemberwiseClone();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public string toIncrementalIDString() {
|
||||
|
||||
Reference in new issue
Block a user