File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -9,30 +9,23 @@ namespace BitFaster.Caching.Lru
9
9
[ DebuggerDisplay ( "{Hot}/{Warm}/{Cold}" ) ]
10
10
public class EqualCapacityPartition : ICapacityPartition
11
11
{
12
- private readonly int hotCapacity ;
13
- private readonly int warmCapacity ;
14
- private readonly int coldCapacity ;
15
-
16
12
/// <summary>
17
13
/// Initializes a new instance of the EqualCapacityPartition class with the specified total capacity.
18
14
/// </summary>
19
15
/// <param name="totalCapacity">The total capacity.</param>
20
16
public EqualCapacityPartition ( int totalCapacity )
21
17
{
22
- var ( hot , warm , cold ) = ComputeQueueCapacity ( totalCapacity ) ;
23
- this . hotCapacity = hot ;
24
- this . warmCapacity = warm ;
25
- this . coldCapacity = cold ;
18
+ ( Hot , Warm , Cold ) = ComputeQueueCapacity ( totalCapacity ) ;
26
19
}
27
20
28
21
///<inheritdoc/>
29
- public int Cold => this . coldCapacity ;
22
+ public int Cold { get ; }
30
23
31
24
///<inheritdoc/>
32
- public int Warm => this . warmCapacity ;
25
+ public int Warm { get ; }
33
26
34
27
///<inheritdoc/>
35
- public int Hot => this . hotCapacity ;
28
+ public int Hot { get ; }
36
29
37
30
private static ( int hot , int warm , int cold ) ComputeQueueCapacity ( int capacity )
38
31
{
You can’t perform that action at this time.
0 commit comments