33using System . Linq ;
44using System . Threading ;
55using System . Threading . Tasks ;
6+ using Neo4j . Driver . Experimental ;
67using Newtonsoft . Json ;
78
89namespace Neo4j . Driver . Tests . TestBackend
@@ -15,38 +16,38 @@ internal class NewBookmarkManager : IProtocolObject
1516
1617 public class NewBookmarkManagerDto
1718 {
18- public Dictionary < string , string [ ] > initialBookmarks { get ; set ; }
19+ public string [ ] initialBookmarks { get ; set ; }
1920 public bool bookmarksSupplierRegistered { get ; set ; }
2021 public bool bookmarksConsumerRegistered { get ; set ; }
2122 }
2223
2324 public override Task Process ( Controller controller )
2425 {
2526 var initialBookmarks =
26- data . initialBookmarks ? . ToDictionary ( x => x . Key , x => x . Value as IEnumerable < string > )
27- ?? new Dictionary < string , IEnumerable < string > > ( ) ;
27+ data . initialBookmarks
28+ ?? Array . Empty < string > ( ) ;
2829
29- async Task < string [ ] > BookmarkSupplier ( string database , CancellationToken _ )
30+ async Task < string [ ] > BookmarkSupplier ( CancellationToken _ )
3031 {
3132 if ( ! data . bookmarksSupplierRegistered )
3233 return Array . Empty < string > ( ) ;
3334
3435 var request = new BookmarkManagerSupplierRequest ( ObjManager ) ;
3536
36- await controller . SendResponse ( GetSupplyRequest ( database , request ) ) ;
37+ await controller . SendResponse ( GetSupplyRequest ( request ) ) ;
3738 var result = await controller . TryConsumeStreamObjectOfType < BookmarksSupplierCompleted > ( ) ;
3839
3940 return result . data . bookmarks ;
4041 }
4142
42- async Task NotifyBookmarks ( string database , string [ ] bookmarks , CancellationToken _ )
43+ async Task NotifyBookmarks ( string [ ] bookmarks , CancellationToken _ )
4344 {
4445 if ( ! data . bookmarksConsumerRegistered )
4546 return ;
4647
4748 var request = new BookmarkManagerConsumerRequest ( ObjManager ) ;
4849
49- await controller . SendResponse ( GetConsumeRequest ( database , bookmarks , request ) ) ;
50+ await controller . SendResponse ( GetConsumeRequest ( bookmarks , request ) ) ;
5051 await controller . TryConsumeStreamObjectOfType < BookmarksConsumerCompleted > ( ) ;
5152 }
5253
@@ -57,16 +58,16 @@ async Task NotifyBookmarks(string database, string[] bookmarks, CancellationToke
5758 return Task . CompletedTask ;
5859 }
5960
60- private string GetConsumeRequest ( string database , string [ ] bookmarks , BookmarkManagerConsumerRequest request )
61+ private string GetConsumeRequest ( string [ ] bookmarks , BookmarkManagerConsumerRequest request )
6162 {
6263 return new ProtocolResponse ( "BookmarksConsumerRequest" ,
63- new { database , bookmarks , bookmarkManagerId = uniqueId , id = request . uniqueId } ) . Encode ( ) ;
64+ new { bookmarks , bookmarkManagerId = uniqueId , id = request . uniqueId } ) . Encode ( ) ;
6465 }
6566
66- private string GetSupplyRequest ( string database , BookmarkManagerSupplierRequest request )
67+ private string GetSupplyRequest ( BookmarkManagerSupplierRequest request )
6768 {
6869 return new ProtocolResponse ( "BookmarksSupplierRequest" ,
69- new { database , bookmarkManagerId = uniqueId , id = request . uniqueId } ) . Encode ( ) ;
70+ new { bookmarkManagerId = uniqueId , id = request . uniqueId } ) . Encode ( ) ;
7071 }
7172
7273 public override string Respond ( )
0 commit comments