@@ -48,12 +48,24 @@ internal enum ReportFormat
48
48
Zipped = 128 ,
49
49
} ;
50
50
51
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
52
+ "AvoidUncalledPrivateCodeRule" ,
53
+ Justification = "Internals Visible To" ) ]
54
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
55
+ "AvoidUninstantiatedInternalClassesRule" ,
56
+ Justification = "Internals Visible To" ) ]
51
57
internal enum Sampling
52
58
{
53
59
All = 0 ,
54
60
Single = 1 ,
55
61
} ;
56
62
63
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
64
+ "AvoidUncalledPrivateCodeRule" ,
65
+ Justification = "Internals Visible To" ) ]
66
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
67
+ "AvoidUninstantiatedInternalClassesRule" ,
68
+ Justification = "Internals Visible To" ) ]
57
69
internal enum Tag
58
70
{
59
71
Null = 0 ,
@@ -64,11 +76,23 @@ internal enum Tag
64
76
}
65
77
66
78
[ ExcludeFromCodeCoverage ]
79
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
80
+ "ImplementEqualsTypeRule" ,
81
+ Justification = "No use case" ) ]
82
+ [ SuppressMessage ( "Gendarme.Rules.Design" ,
83
+ "OperatorEqualsShouldBeOverloadedRule" ,
84
+ Justification = "No use case" ) ]
67
85
internal struct Pair
68
86
{
69
87
public long Time ;
70
88
public int Call ;
71
89
90
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
91
+ "AvoidUncalledPrivateCodeRule" ,
92
+ Justification = "Internals Visible To" ) ]
93
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
94
+ "OverrideValueTypeDefaultsRule" ,
95
+ Justification = "You what, mate?" ) ]
72
96
public static Pair Create ( long time , int call )
73
97
{
74
98
return new Pair { Time = time , Call = call } ;
@@ -97,10 +121,13 @@ public override int GetHashCode()
97
121
}
98
122
}
99
123
124
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
125
+ "ImplementEqualsTypeRule" ,
126
+ Justification = "abstract type, No use case" ) ]
100
127
internal abstract class Track
101
128
{
102
- internal static readonly string Entry = "\u2611 " ; // BALLOT BOX WITH CHECK
103
- internal static readonly string Exit = "\u2612 " ; // BALLOT BOX WITH X
129
+ internal const string Entry = "\u2611 " ; // BALLOT BOX WITH CHECK
130
+ internal const string Exit = "\u2612 " ; // BALLOT BOX WITH X
104
131
105
132
public override bool Equals ( object obj )
106
133
{
@@ -113,6 +140,9 @@ public override int GetHashCode()
113
140
}
114
141
}
115
142
143
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
144
+ "ImplementEqualsTypeRule" ,
145
+ Justification = "No use case" ) ]
116
146
internal class Null : Track
117
147
{
118
148
public override string ToString ( )
@@ -131,6 +161,9 @@ public override int GetHashCode()
131
161
}
132
162
}
133
163
164
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
165
+ "ImplementEqualsTypeRule" ,
166
+ Justification = "No use case" ) ]
134
167
internal class Time : Track
135
168
{
136
169
public readonly long Value ;
@@ -142,9 +175,9 @@ public Time(long time)
142
175
143
176
public override bool Equals ( object obj )
144
177
{
145
- if ( obj is Time )
178
+ if ( obj is Time t )
146
179
{
147
- return Value == ( ( Time ) obj ) . Value ;
180
+ return Value == t . Value ;
148
181
}
149
182
150
183
return false ;
@@ -161,7 +194,10 @@ public override string ToString()
161
194
}
162
195
}
163
196
164
- internal class Call : Track
197
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
198
+ "ImplementEqualsTypeRule" ,
199
+ Justification = "No use case" ) ]
200
+ internal sealed class Call : Track
165
201
{
166
202
public readonly int Value ;
167
203
@@ -172,9 +208,9 @@ public Call(int call)
172
208
173
209
public override bool Equals ( object obj )
174
210
{
175
- if ( obj is Call )
211
+ if ( obj is Call c )
176
212
{
177
- return Value == ( ( Call ) obj ) . Value ;
213
+ return Value == c . Value ;
178
214
}
179
215
180
216
return false ;
@@ -191,7 +227,10 @@ public override string ToString()
191
227
}
192
228
}
193
229
194
- internal class Both : Track
230
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
231
+ "ImplementEqualsTypeRule" ,
232
+ Justification = "No use case" ) ]
233
+ internal sealed class Both : Track
195
234
{
196
235
public readonly Pair Value ;
197
236
@@ -222,7 +261,7 @@ public override string ToString()
222
261
}
223
262
}
224
263
225
- internal class Table : Track
264
+ internal sealed class Table : Track
226
265
{
227
266
public readonly Dictionary < string , Dictionary < int , PointVisit > > Value ;
228
267
@@ -232,7 +271,10 @@ public Table(Dictionary<string, Dictionary<int, PointVisit>> table)
232
271
}
233
272
}
234
273
235
- internal class PointVisit
274
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
275
+ "ImplementEqualsTypeRule" ,
276
+ Justification = "No use case" ) ]
277
+ internal sealed class PointVisit
236
278
{
237
279
public long Count ;
238
280
public readonly List < Track > Tracks ;
@@ -300,6 +342,9 @@ internal long Total
300
342
301
343
internal static class Counter
302
344
{
345
+ [ SuppressMessage ( "Gendarme.Rules.Design.Generic" ,
346
+ "AvoidDeclaringCustomDelegatesRule" ,
347
+ Justification = "Net Framework 2.0" ) ]
303
348
public delegate void PointProcessor ( XmlElement doc , IEnumerable < Track > tracking ) ;
304
349
305
350
// <summary>
@@ -327,7 +372,8 @@ internal static class Counter
327
372
328
373
internal static class I
329
374
#else
330
- static private class I
375
+
376
+ private static class I
331
377
#endif
332
378
{
333
379
internal struct coverXml
@@ -482,6 +528,12 @@ private static XmlDocument readXDocument(Stream stream)
482
528
private static void writeXDocument ( XmlDocument coverageDocument , Stream stream )
483
529
{ coverageDocument . Save ( stream ) ; }
484
530
531
+ [ SuppressMessage ( "Gendarme.Rules.Smells" ,
532
+ "AvoidLongMethodsRule" ,
533
+ Justification = "Well tested code" ) ]
534
+ [ SuppressMessage ( "Gendarme.Rules.Smells" ,
535
+ "AvoidLongParameterListsRule" ,
536
+ Justification = "Stable code" ) ]
485
537
public static DateTime updateReport (
486
538
Action < XmlDocument > postProcess ,
487
539
PointProcessor pointProcess ,
@@ -605,6 +657,9 @@ out var vc
605
657
return flushStart ;
606
658
}
607
659
660
+ [ SuppressMessage ( "Gendarme.Rules.Smells" ,
661
+ "AvoidLongParameterListsRule" ,
662
+ Justification = "Stable code" ) ]
608
663
public static TimeSpan doFlush (
609
664
Action < XmlDocument > postProcess ,
610
665
PointProcessor pointProcess ,
@@ -644,6 +699,9 @@ Track context
644
699
645
700
#if RUNNER
646
701
702
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
703
+ "AvoidUncalledPrivateCodeRule" ,
704
+ Justification = "Internals Visible To" ) ]
647
705
internal static long addVisit (
648
706
Dictionary < string , Dictionary < int , PointVisit > > counts ,
649
707
string moduleId ,
@@ -660,9 +718,12 @@ Track context
660
718
return 1 ;
661
719
}
662
720
721
+ [ SuppressMessage ( "Gendarme.Rules.Performance" ,
722
+ "AvoidUncalledPrivateCodeRule" ,
723
+ Justification = "Internals Visible To" ) ]
663
724
[ SuppressMessage ( "Gendarme.Rules.Smells" ,
664
- "AvoidLongParameterListsRule" ,
665
- Justification = "Most of this gets curried away " ) ]
725
+ "AvoidLongParameterListsRule" ,
726
+ Justification = "Stable code " ) ]
666
727
public static TimeSpan doFlushStream (
667
728
Action < XmlDocument > postProcess ,
668
729
PointProcessor pointProcess ,
0 commit comments