Merging changes
This commit is contained in:
1 parent
c4216d2272
commit
797816be7e
437 files changed
+54228
-28
No files matched your search
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
/// <summary>
|
||||
/// A more complete and 'correct' version of BlueRowCollectionStaticStream. Should replace it finally, though
|
||||
/// at this time, to expedite the process, both exist simultaniously
|
||||
/// </summary>
|
||||
public class MutableStream : ViewStream
|
||||
{
|
||||
public MutableStream () {}
|
||||
|
||||
public MutableStream (IBlueRowCollection rows)
|
||||
{
|
||||
loadCollection (rows);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires a datapacket with newRows set to the argument, and the whole previous state (if existed)
|
||||
/// set as the deletedRows.
|
||||
/// </summary>
|
||||
/// <param name="rows"></param>
|
||||
public void loadCollection (IBlueRowCollection rows)
|
||||
{
|
||||
myFireEvent (new DataPacket (rows, new BlueTable(rows),
|
||||
myLastValue != null ?
|
||||
new BlueTable((myLastValue as DataPacket).newRows) : new BlueTable (rows.schema)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires the whole datapacket as one. Its the callers responsibility to make sure that it makes incremental sense
|
||||
/// </summary>
|
||||
/// <param name="dp"></param>
|
||||
public void loadPacket (DataPacket dp) {myFireEvent (dp);}
|
||||
|
||||
protected override void myOnFirstSubscriber()
|
||||
{
|
||||
if (myLastValue != null)
|
||||
loadPacket (myLastValue as DataPacket);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user