File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
BackEnd/Components/RequestBuilder Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -252,17 +252,17 @@ private List<string> CreateListOfParameterValues()
252252 }
253253
254254 // Add parameters on any output tags
255- foreach ( ProjectTaskInstanceChild taskOutputSpecification in _taskNode . Outputs )
255+ // Perf: Moved to indexed based for loop to avoid boxing of the enumerator for IList.
256+ for ( int i = 0 ; i < _taskNode . Outputs . Count ; i ++ )
256257 {
257- ProjectTaskOutputItemInstance outputItemInstance = taskOutputSpecification as ProjectTaskOutputItemInstance ;
258- if ( outputItemInstance != null )
258+ ProjectTaskInstanceChild taskOutputSpecification = _taskNode . Outputs [ i ] ;
259+ if ( taskOutputSpecification is ProjectTaskOutputItemInstance outputItemInstance )
259260 {
260261 taskParameters . Add ( outputItemInstance . TaskParameter ) ;
261262 taskParameters . Add ( outputItemInstance . ItemType ) ;
262263 }
263264
264- ProjectTaskOutputPropertyInstance outputPropertyInstance = taskOutputSpecification as ProjectTaskOutputPropertyInstance ;
265- if ( outputPropertyInstance != null )
265+ if ( taskOutputSpecification is ProjectTaskOutputPropertyInstance outputPropertyInstance )
266266 {
267267 taskParameters . Add ( outputPropertyInstance . TaskParameter ) ;
268268 taskParameters . Add ( outputPropertyInstance . PropertyName ) ;
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ public override ElementLocation ConditionLocation
299299 /// <summary>
300300 /// Retrieves the parameters dictionary as used during the build.
301301 /// </summary>
302- internal IDictionary < string , ( string , ElementLocation ) > ParametersForBuild
302+ internal CopyOnWriteDictionary < ( string , ElementLocation ) > ParametersForBuild
303303 {
304304 get { return _parameters ; }
305305 }
You can’t perform that action at this time.
0 commit comments