@@ -43,7 +43,7 @@ public WebSocketSnapshotManager(string component, IWebSocketClient webSocketClie
4343 h => SnapshotReceived -= h ) ;
4444 }
4545
46- public List < MessageEventArgs > GetSnapshot ( string stateMachine , int ? chunkSize = null , int timeout = 10000 )
46+ public List < MessageEventArgs > GetSnapshot ( string stateMachine , string filter = null , int ? chunkSize = null , int timeout = 10000 )
4747 {
4848 var replyTopic = Guid . NewGuid ( ) . ToString ( ) ;
4949
@@ -74,7 +74,7 @@ public List<MessageEventArgs> GetSnapshot(string stateMachine, int? chunkSize =
7474 using ( _snapshotStream . Subscribe ( observer ) )
7575 {
7676 SendWebSocketSnapshotSubscriptionResquest ( replyTopic ) ;
77- SendWebSocketSnapshotRequest ( stateMachine , replyTopic , chunkSize ) ;
77+ SendWebSocketSnapshotRequest ( stateMachine , replyTopic , filter , chunkSize ) ;
7878 lockEvent . WaitOne ( timeout ) ;
7979 }
8080
@@ -84,12 +84,12 @@ public List<MessageEventArgs> GetSnapshot(string stateMachine, int? chunkSize =
8484 return result ;
8585 }
8686
87- public Task < List < MessageEventArgs > > GetSnapshotAsync ( string stateMachine , int ? chunkSize = null , int timeout = 10000 )
87+ public Task < List < MessageEventArgs > > GetSnapshotAsync ( string stateMachine , string filter = null , int ? chunkSize = null , int timeout = 10000 )
8888 {
89- return Task . Run ( ( ) => GetSnapshot ( stateMachine , chunkSize , timeout ) ) ;
89+ return Task . Run ( ( ) => GetSnapshot ( stateMachine , filter , chunkSize , timeout ) ) ;
9090 }
9191
92- private void SendWebSocketSnapshotRequest ( string stateMachine , string replyTopic , int ? chunkSize )
92+ private void SendWebSocketSnapshotRequest ( string stateMachine , string replyTopic , string filter = null , int ? chunkSize = null )
9393 {
9494 if ( ! _webSocketClient . IsOpen ) return ;
9595
@@ -101,7 +101,7 @@ private void SendWebSocketSnapshotRequest(string stateMachine, string replyTopic
101101 ComponentCode = componentCode ,
102102 StateMachineCode = stateMachineCode
103103 } ;
104- var snapshotMessage = new WebSocketSnapshotMessage ( stateMachineCode , componentCode , replyTopic , _privateCommunicationIdentifier , chunkSize ) ;
104+ var snapshotMessage = new WebSocketSnapshotMessage ( stateMachineCode , componentCode , replyTopic , _privateCommunicationIdentifier , chunkSize , filter ) ;
105105 var webSocketRequest = WebSocketMessageHelper . SerializeRequest (
106106 WebSocketCommand . Snapshot ,
107107 inputHeader ,
0 commit comments