@@ -7,22 +7,22 @@ public static class BloomCommandBuilder
77{
88 public static SerializedCommand Add ( RedisKey key , RedisValue item )
99 {
10- return new SerializedCommand ( BF . ADD , key , item ) ;
10+ return new ( BF . ADD , key , item ) ;
1111 }
1212
1313 public static SerializedCommand Card ( RedisKey key )
1414 {
15- return new SerializedCommand ( BF . CARD , key ) ;
15+ return new ( BF . CARD , key ) ;
1616 }
1717
1818 public static SerializedCommand Exists ( RedisKey key , RedisValue item )
1919 {
20- return new SerializedCommand ( BF . EXISTS , key , item ) ;
20+ return new ( BF . EXISTS , key , item ) ;
2121 }
2222
2323 public static SerializedCommand Info ( RedisKey key )
2424 {
25- return new SerializedCommand ( BF . INFO , key ) ;
25+ return new ( BF . INFO , key ) ;
2626 }
2727
2828 public static SerializedCommand Insert ( RedisKey key , RedisValue [ ] items , int ? capacity = null ,
@@ -34,41 +34,41 @@ public static SerializedCommand Insert(RedisKey key, RedisValue[] items, int? ca
3434
3535 var args = BloomAux . BuildInsertArgs ( key , items , capacity , error , expansion , nocreate , nonscaling ) ;
3636
37- return new SerializedCommand ( BF . INSERT , args ) ;
37+ return new ( BF . INSERT , args ) ;
3838 }
3939
4040 public static SerializedCommand LoadChunk ( RedisKey key , long iterator , Byte [ ] data )
4141 {
42- return new SerializedCommand ( BF . LOADCHUNK , key , iterator , data ) ;
42+ return new ( BF . LOADCHUNK , key , iterator , data ) ;
4343 }
4444
4545 public static SerializedCommand MAdd ( RedisKey key , params RedisValue [ ] items )
4646 {
4747 if ( items . Length < 1 )
4848 throw new ArgumentOutOfRangeException ( nameof ( items ) ) ;
4949
50- List < object > args = new List < object > { key } ;
50+ List < object > args = [ key ] ;
5151 args . AddRange ( items . Cast < object > ( ) ) ;
5252
53- return new SerializedCommand ( BF . MADD , args ) ;
53+ return new ( BF . MADD , args ) ;
5454 }
5555
5656 public static SerializedCommand MExists ( RedisKey key , RedisValue [ ] items )
5757 {
5858 if ( items . Length < 1 )
5959 throw new ArgumentOutOfRangeException ( nameof ( items ) ) ;
6060
61- List < object > args = new List < object > { key } ;
61+ List < object > args = [ key ] ;
6262 args . AddRange ( items . Cast < object > ( ) ) ;
6363
64- return new SerializedCommand ( BF . MEXISTS , args ) ;
64+ return new ( BF . MEXISTS , args ) ;
6565
6666 }
6767
6868 public static SerializedCommand Reserve ( RedisKey key , double errorRate , long capacity ,
6969 int ? expansion = null , bool nonscaling = false )
7070 {
71- List < object > args = new List < object > { key , errorRate , capacity } ;
71+ List < object > args = [ key , errorRate , capacity ] ;
7272
7373 if ( expansion != null )
7474 {
@@ -80,11 +80,11 @@ public static SerializedCommand Reserve(RedisKey key, double errorRate, long cap
8080 args . Add ( BloomArgs . NONSCALING ) ;
8181 }
8282
83- return new SerializedCommand ( BF . RESERVE , args ) ;
83+ return new ( BF . RESERVE , args ) ;
8484 }
8585
8686 public static SerializedCommand ScanDump ( RedisKey key , long iterator )
8787 {
88- return new SerializedCommand ( BF . SCANDUMP , key , iterator ) ;
88+ return new ( BF . SCANDUMP , key , iterator ) ;
8989 }
9090}
0 commit comments