File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
TestStack.ConventionTests/Internal Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
<wpf : ResourceDictionary xml : space =" preserve" xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" xmlns : s =" clr-namespace:System;assembly=mscorlib" xmlns : ss =" urn:shemas-jetbrains-com:settings-storage-xaml" xmlns : wpf =" http://schemas.microsoft.com/winfx/2006/xaml/presentation" >
2
+ <s : String x : Key =" /Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantArgumentNameForLiteralExpression/@EntryIndexedValue" >DO_NOT_SHOW</s : String >
2
3
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=all/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="all"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSRemoveCodeRedundancies>True</CSRemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSUseVar><BehavourStyle>CAN_CHANGE_TO_IMPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_IMPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_IMPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSReorderTypeMembers>True</CSReorderTypeMembers></Profile></s:String>
3
4
<s : String x : Key =" /Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue" >all</s : String >
4
5
<s : Boolean x : Key =" /Default/CodeStyle/CodeFormatting/CSharpFormat/EXPLICIT_PRIVATE_MODIFIER/@EntryValue" >False</s : Boolean >
Original file line number Diff line number Diff line change 7
7
8
8
public class ConventionResult
9
9
{
10
- ConventionResult ( )
10
+ ConventionResult ( bool failed )
11
11
{
12
+ Failed = failed ;
12
13
}
13
14
14
15
public string Message { get ; private set ; }
15
16
16
- public bool Failed
17
- {
18
- get { return ! string . IsNullOrEmpty ( Message ) ; }
19
- }
17
+ public bool Failed { get ; private set ; }
20
18
21
19
public static ConventionResult For < TResult > (
22
20
string header , IEnumerable < TResult > items ,
23
21
Action < TResult , StringBuilder > itemDescriptor )
24
22
{
25
23
var array = items . ToArray ( ) ;
26
- var result = new ConventionResult ( ) ;
27
24
if ( array . None ( ) )
28
25
{
29
- return result ;
26
+ return new ConventionResult ( failed : false ) ;
30
27
}
31
28
32
- // NOTE: we might possibly want to abstract the StringBuilder to have more high level construct that would allow us to plug rich reports here...
29
+ var result = new ConventionResult ( true ) ;
33
30
var message = new StringBuilder ( header ) ;
34
31
message . AppendLine ( ) ;
35
32
message . AppendLine ( string . Empty . PadRight ( header . Length , '-' ) ) ;
@@ -53,10 +50,9 @@ public static ConventionResult ForSymmetric<TResult>(
53
50
{
54
51
var firstArray = firstResults . ToArray ( ) ;
55
52
var secondArray = secondResults . ToArray ( ) ;
56
- var result = new ConventionResult ( ) ;
57
53
if ( firstArray . None ( ) && secondArray . None ( ) )
58
54
{
59
- return result ;
55
+ return new ConventionResult ( failed : true ) ;
60
56
}
61
57
62
58
var message = new StringBuilder ( ) ;
You can’t perform that action at this time.
0 commit comments