File tree Expand file tree Collapse file tree
TestStack.ConventionTests/Internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<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 >
23 <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>
34 <s : String x : Key =" /Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue" >all</s : String >
45 <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 77
88 public class ConventionResult
99 {
10- ConventionResult ( )
10+ ConventionResult ( bool failed )
1111 {
12+ Failed = failed ;
1213 }
1314
1415 public string Message { get ; private set ; }
1516
16- public bool Failed
17- {
18- get { return ! string . IsNullOrEmpty ( Message ) ; }
19- }
17+ public bool Failed { get ; private set ; }
2018
2119 public static ConventionResult For < TResult > (
2220 string header , IEnumerable < TResult > items ,
2321 Action < TResult , StringBuilder > itemDescriptor )
2422 {
2523 var array = items . ToArray ( ) ;
26- var result = new ConventionResult ( ) ;
2724 if ( array . None ( ) )
2825 {
29- return result ;
26+ return new ConventionResult ( failed : false ) ;
3027 }
3128
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 ) ;
3330 var message = new StringBuilder ( header ) ;
3431 message . AppendLine ( ) ;
3532 message . AppendLine ( string . Empty . PadRight ( header . Length , '-' ) ) ;
@@ -53,10 +50,9 @@ public static ConventionResult ForSymmetric<TResult>(
5350 {
5451 var firstArray = firstResults . ToArray ( ) ;
5552 var secondArray = secondResults . ToArray ( ) ;
56- var result = new ConventionResult ( ) ;
5753 if ( firstArray . None ( ) && secondArray . None ( ) )
5854 {
59- return result ;
55+ return new ConventionResult ( failed : true ) ;
6056 }
6157
6258 var message = new StringBuilder ( ) ;
You can’t perform that action at this time.
0 commit comments