@@ -16,25 +16,25 @@ public abstract class ValueAccumulator<T>
1616 /// <summary>
1717 /// The total accumulated value (Read only).
1818 /// </summary>
19- public T total { get ; protected set ; }
19+ public T Total { get ; protected set ; }
2020
2121 /// <summary>
2222 /// The number of unique values being accumulated (Read only).
2323 /// </summary>
24- public int count => values . Count ;
24+ public int Count => values . Count ;
2525
2626 /// <summary>
2727 /// The default value of <typeparamref name="T"/>.
2828 /// </summary>
29- protected virtual T defaultValue => default ( T ) ;
29+ protected virtual T DefaultValue => default ( T ) ;
3030
3131 /// <summary>
3232 /// Creates a new instance of the value accumulator.
3333 /// </summary>
3434 public ValueAccumulator ( )
3535 {
3636 values = new Dictionary < int , T > ( ) ;
37- total = defaultValue ;
37+ Total = DefaultValue ;
3838 }
3939
4040 /// <summary>
@@ -49,7 +49,7 @@ public T GetValue(int identifier)
4949 if ( values . TryGetValue ( identifier , out value ) ) {
5050 return value ;
5151 } else {
52- return defaultValue ;
52+ return DefaultValue ;
5353 }
5454 }
5555
@@ -66,13 +66,13 @@ public void SetValue(int identifier, T value)
6666
6767 if ( values . TryGetValue ( identifier , out currentValue ) )
6868 {
69- total = Subtract ( currentValue ) ;
70- total = Add ( value ) ;
69+ Total = Subtract ( currentValue ) ;
70+ Total = Add ( value ) ;
7171 values [ identifier ] = value ;
7272 }
7373 else
7474 {
75- total = Add ( value ) ;
75+ Total = Add ( value ) ;
7676 values . Add ( identifier , value ) ;
7777 }
7878 }
@@ -88,7 +88,7 @@ public void RemoveValue(int identifier)
8888
8989 if ( values . TryGetValue ( identifier , out value ) )
9090 {
91- total = Subtract ( value ) ;
91+ Total = Subtract ( value ) ;
9292 values . Remove ( identifier ) ;
9393 }
9494 }
@@ -99,7 +99,7 @@ public void RemoveValue(int identifier)
9999 public void Clear ( )
100100 {
101101 values . Clear ( ) ;
102- total = defaultValue ;
102+ Total = DefaultValue ;
103103 }
104104
105105 /// <summary>
0 commit comments