@@ -7,22 +7,22 @@ public static class BloomCommandBuilder
7
7
{
8
8
public static SerializedCommand Add ( RedisKey key , RedisValue item )
9
9
{
10
- return new SerializedCommand ( BF . ADD , key , item ) ;
10
+ return new ( BF . ADD , key , item ) ;
11
11
}
12
12
13
13
public static SerializedCommand Card ( RedisKey key )
14
14
{
15
- return new SerializedCommand ( BF . CARD , key ) ;
15
+ return new ( BF . CARD , key ) ;
16
16
}
17
17
18
18
public static SerializedCommand Exists ( RedisKey key , RedisValue item )
19
19
{
20
- return new SerializedCommand ( BF . EXISTS , key , item ) ;
20
+ return new ( BF . EXISTS , key , item ) ;
21
21
}
22
22
23
23
public static SerializedCommand Info ( RedisKey key )
24
24
{
25
- return new SerializedCommand ( BF . INFO , key ) ;
25
+ return new ( BF . INFO , key ) ;
26
26
}
27
27
28
28
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
34
34
35
35
var args = BloomAux . BuildInsertArgs ( key , items , capacity , error , expansion , nocreate , nonscaling ) ;
36
36
37
- return new SerializedCommand ( BF . INSERT , args ) ;
37
+ return new ( BF . INSERT , args ) ;
38
38
}
39
39
40
40
public static SerializedCommand LoadChunk ( RedisKey key , long iterator , Byte [ ] data )
41
41
{
42
- return new SerializedCommand ( BF . LOADCHUNK , key , iterator , data ) ;
42
+ return new ( BF . LOADCHUNK , key , iterator , data ) ;
43
43
}
44
44
45
45
public static SerializedCommand MAdd ( RedisKey key , params RedisValue [ ] items )
46
46
{
47
47
if ( items . Length < 1 )
48
48
throw new ArgumentOutOfRangeException ( nameof ( items ) ) ;
49
49
50
- List < object > args = new List < object > { key } ;
50
+ List < object > args = [ key ] ;
51
51
args . AddRange ( items . Cast < object > ( ) ) ;
52
52
53
- return new SerializedCommand ( BF . MADD , args ) ;
53
+ return new ( BF . MADD , args ) ;
54
54
}
55
55
56
56
public static SerializedCommand MExists ( RedisKey key , RedisValue [ ] items )
57
57
{
58
58
if ( items . Length < 1 )
59
59
throw new ArgumentOutOfRangeException ( nameof ( items ) ) ;
60
60
61
- List < object > args = new List < object > { key } ;
61
+ List < object > args = [ key ] ;
62
62
args . AddRange ( items . Cast < object > ( ) ) ;
63
63
64
- return new SerializedCommand ( BF . MEXISTS , args ) ;
64
+ return new ( BF . MEXISTS , args ) ;
65
65
66
66
}
67
67
68
68
public static SerializedCommand Reserve ( RedisKey key , double errorRate , long capacity ,
69
69
int ? expansion = null , bool nonscaling = false )
70
70
{
71
- List < object > args = new List < object > { key , errorRate , capacity } ;
71
+ List < object > args = [ key , errorRate , capacity ] ;
72
72
73
73
if ( expansion != null )
74
74
{
@@ -80,11 +80,11 @@ public static SerializedCommand Reserve(RedisKey key, double errorRate, long cap
80
80
args . Add ( BloomArgs . NONSCALING ) ;
81
81
}
82
82
83
- return new SerializedCommand ( BF . RESERVE , args ) ;
83
+ return new ( BF . RESERVE , args ) ;
84
84
}
85
85
86
86
public static SerializedCommand ScanDump ( RedisKey key , long iterator )
87
87
{
88
- return new SerializedCommand ( BF . SCANDUMP , key , iterator ) ;
88
+ return new ( BF . SCANDUMP , key , iterator ) ;
89
89
}
90
90
}
0 commit comments