File tree 2 files changed +21
-4
lines changed
source/Nuke.Common/Execution
2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
7
7
## [ vNext]
8
8
9
+ ## [ 0.10.2] / 2018-10-04
10
+ - Fixed ` RequirementService ` to also support shorthand for properties
11
+
9
12
## [ 0.10.1] / 2018-10-02
10
13
- Fixed wizard to pass definitions for project file template
11
14
- Fixed wizard to create source and tests directory if selected
@@ -161,7 +164,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
161
164
- Added CLT tasks for Git
162
165
- Fixed background color in console output
163
166
164
- [ vNext ] : https://github.com/nuke-build/nuke/compare/0.10.1...HEAD
167
+ [ vNext ] : https://github.com/nuke-build/nuke/compare/0.10.2...HEAD
168
+ [ 0.10.2 ] : https://github.com/nuke-build/nuke/compare/0.10.1...0.10.2
165
169
[ 0.10.1 ] : https://github.com/nuke-build/nuke/compare/0.10.0...0.10.1
166
170
[ 0.10.0 ] : https://github.com/nuke-build/nuke/compare/0.9.1...0.10.0
167
171
[ 0.9.1 ] : https://github.com/nuke-build/nuke/compare/0.9.0...0.9.1
Original file line number Diff line number Diff line change 4
4
5
5
using System ;
6
6
using System . Collections . Generic ;
7
+ using System . Configuration ;
7
8
using System . Linq ;
8
9
using System . Linq . Expressions ;
9
10
using System . Reflection ;
@@ -26,10 +27,22 @@ public static void ValidateRequirements(IReadOnlyCollection<TargetDefinition> ex
26
27
var memberExpression = requirement . Body is MemberExpression
27
28
? ( MemberExpression ) requirement . Body
28
29
: ( MemberExpression ) ( ( UnaryExpression ) requirement . Body ) . Operand ;
29
- var field = ( FieldInfo ) memberExpression . Member ;
30
30
31
- ControlFlow . Assert ( field . GetValue ( build ) != null ,
32
- $ "Target '{ target . Name } ' requires that field '{ field . Name } ' must be not null.") ;
31
+ switch ( memberExpression . Member )
32
+ {
33
+ case FieldInfo field :
34
+ ControlFlow . Assert (
35
+ field . GetValue ( build ) != null ,
36
+ $ "Target '{ target . Name } ' requires that field '{ field . Name } ' must be not null.") ;
37
+ break ;
38
+ case PropertyInfo property :
39
+ ControlFlow . Assert (
40
+ property . GetValue ( build ) != null ,
41
+ $ "Target '{ target . Name } ' requires that property '{ property . Name } ' must be not null.") ;
42
+ break ;
43
+ default :
44
+ throw new Exception ( $ "Member type { memberExpression . Member } not supported.") ;
45
+ }
33
46
}
34
47
}
35
48
}
You can’t perform that action at this time.
0 commit comments