@@ -60,7 +60,6 @@ public class WorkItemTypeModel
6060 /// <processingtarget>Pipelines</processingtarget>
6161 public partial class ProcessDefinitionProcessor : Processor
6262 {
63- private ProcessDefinitionProcessorOptions _Options ;
6463 private ProcessorModel SourceModel ;
6564 private ProcessorModel TargetModel ;
6665 private Dictionary < string , WorkItemField > SourceFields = new Dictionary < string , WorkItemField > ( ) ;
@@ -97,7 +96,7 @@ protected override void InternalExecute()
9796 private void EnsureConfigured ( )
9897 {
9998 Log . LogInformation ( "Processor::EnsureConfigured" ) ;
100- if ( _Options == null )
99+ if ( Options == null )
101100 {
102101 throw new Exception ( "You must call Configure() first" ) ;
103102 }
@@ -110,7 +109,7 @@ private void EnsureConfigured()
110109 throw new Exception ( "The Target endpoint configured must be of type AzureDevOpsEndpoint" ) ;
111110 }
112111
113- if ( _Options . Processes . Count == 0 ) _Options . Processes . Add ( "*" , new List < string > ( ) { "*" } ) ;
112+ if ( Options . Processes . Count == 0 ) Options . Processes . Add ( "*" , new List < string > ( ) { "*" } ) ;
114113
115114 if ( Source . Options . Name == Target . Options . Name )
116115 {
@@ -134,7 +133,7 @@ await Task.WhenAll(
134133
135134 Log . LogInformation ( "Synchronizing organization level fields." ) ;
136135 // We've got all the target and sources data.. let's start syncronizing
137- await SourceFields . Values . ParallelForEachAsync ( Math . Max ( 1 , _Options . MaxDegreeOfParallelism ) , async ( sourceField ) =>
136+ await SourceFields . Values . ParallelForEachAsync ( Math . Max ( 1 , Options . MaxDegreeOfParallelism ) , async ( sourceField ) =>
138137 {
139138 if ( sourceField . ReferenceName . StartsWith ( "System." ) || sourceField . ReferenceName . StartsWith ( "Microsoft." ) )
140139 {
@@ -147,7 +146,7 @@ await SourceFields.Values.ParallelForEachAsync(Math.Max(1, _Options.MaxDegreeOfP
147146 }
148147 } ) ;
149148
150- await SourceModel . ProcessDefinitions . Values . ParallelForEachAsync ( Math . Max ( 1 , _Options . MaxDegreeOfParallelism ) , SyncProcess ) ;
149+ await SourceModel . ProcessDefinitions . Values . ParallelForEachAsync ( Math . Max ( 1 , Options . MaxDegreeOfParallelism ) , SyncProcess ) ;
151150 }
152151 catch ( Exception ex )
153152 {
@@ -488,12 +487,12 @@ private async Task BuildModel(ProcessorModel model, AzureDevOpsEndpoint endpoint
488487
489488
490489 var procs = await endpoint . GetApiDefinitionsAsync < ProcessDefinition > ( ) ;
491- foreach ( var processFilter in _Options . Processes . Keys )
490+ foreach ( var processFilter in Options . Processes . Keys )
492491 {
493492 string mappedProcName = processFilter ;
494- if ( model == TargetModel && _Options . ProcessMaps . ContainsKey ( processFilter ) )
493+ if ( model == TargetModel && Options . ProcessMaps . ContainsKey ( processFilter ) )
495494 {
496- mappedProcName = _Options . ProcessMaps [ processFilter ] ;
495+ mappedProcName = Options . ProcessMaps [ processFilter ] ;
497496 }
498497
499498 var proc = procs . FirstOrDefault ( p => processFilter == "*"
@@ -521,7 +520,7 @@ private async Task BuildModel(ProcessorModel model, AzureDevOpsEndpoint endpoint
521520 #region Build Work Item Types data ...
522521
523522 var procWits = ( await endpoint . GetApiDefinitionsAsync < WorkItemType > ( new string [ ] { proc . Id } , singleDefinitionQueryString : "$expand=All" ) ) ;
524- procWits = procWits . Where ( x => _Options . Processes [ processFilter ] . Any ( a => a == "*"
523+ procWits = procWits . Where ( x => Options . Processes [ processFilter ] . Any ( a => a == "*"
525524 || x . Name . Equals ( a , StringComparison . OrdinalIgnoreCase ) ) ) ;
526525 if ( procWits != null && procWits . Count ( ) > 0 )
527526 {
0 commit comments