File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/GitVersionCore/Helpers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -200,13 +200,17 @@ static void WriteObject(TextWriter tw, object o)
200
200
{
201
201
// Object
202
202
var isFirst = true ;
203
- foreach ( var item in o . GetType ( ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance | BindingFlags . GetProperty ) . Where ( p => ! p . GetCustomAttributes ( typeof ( VersionVariables . ReflectionIgnoreAttribute ) , false ) . Any ( ) ) )
203
+ var propertyInfos = o . GetType ( )
204
+ . GetProperties ( BindingFlags . Public | BindingFlags . Instance | BindingFlags . GetProperty )
205
+ . Where ( p => ! p . GetCustomAttributes ( typeof ( VersionVariables . ReflectionIgnoreAttribute ) , false ) . Any ( ) ) ;
206
+
207
+ foreach ( var item in propertyInfos )
204
208
{
205
209
if ( ! isFirst ) tw . Write ( "," ) ;
206
210
else isFirst = false ;
207
211
208
212
var key = item . Name ;
209
- var value = item . GetGetMethod ( ) . Invoke ( o , null ) ; // safe reflection for unity
213
+ var value = item . GetGetMethod ( ) . Invoke ( o , null ) ;
210
214
tw . Write ( '\" ' ) ;
211
215
tw . Write ( key ) ;
212
216
tw . Write ( '\" ' ) ;
You can’t perform that action at this time.
0 commit comments