@@ -16,13 +16,13 @@ namespace DotNetApiDiff.Commands;
1616/// </summary>
1717public class CompareCommandSettings : CommandSettings
1818{
19- [ CommandArgument ( 0 , "<oldAssembly >" ) ]
20- [ Description ( "Path to the old /baseline assembly" ) ]
21- public required string OldAssemblyPath { get ; init ; }
19+ [ CommandArgument ( 0 , "<sourceAssembly >" ) ]
20+ [ Description ( "Path to the source /baseline assembly" ) ]
21+ public required string SourceAssemblyPath { get ; init ; }
2222
23- [ CommandArgument ( 1 , "<newAssembly >" ) ]
24- [ Description ( "Path to the new /current assembly" ) ]
25- public required string NewAssemblyPath { get ; init ; }
23+ [ CommandArgument ( 1 , "<targetAssembly >" ) ]
24+ [ Description ( "Path to the target /current assembly" ) ]
25+ public required string TargetAssemblyPath { get ; init ; }
2626
2727 [ CommandOption ( "-c|--config <configFile>" ) ]
2828 [ Description ( "Path to configuration file" ) ]
@@ -76,16 +76,16 @@ public CompareCommand(IServiceProvider serviceProvider)
7676 /// <returns>ValidationResult indicating success or failure</returns>
7777 public override ValidationResult Validate ( [ NotNull ] CommandContext context , [ NotNull ] CompareCommandSettings settings )
7878 {
79- // Validate old assembly path
80- if ( ! File . Exists ( settings . OldAssemblyPath ) )
79+ // Validate source assembly path
80+ if ( ! File . Exists ( settings . SourceAssemblyPath ) )
8181 {
82- return ValidationResult . Error ( $ "Old assembly file not found: { settings . OldAssemblyPath } ") ;
82+ return ValidationResult . Error ( $ "Source assembly file not found: { settings . SourceAssemblyPath } ") ;
8383 }
8484
85- // Validate new assembly path
86- if ( ! File . Exists ( settings . NewAssemblyPath ) )
85+ // Validate target assembly path
86+ if ( ! File . Exists ( settings . TargetAssemblyPath ) )
8787 {
88- return ValidationResult . Error ( $ "New assembly file not found: { settings . NewAssemblyPath } ") ;
88+ return ValidationResult . Error ( $ "Target assembly file not found: { settings . TargetAssemblyPath } ") ;
8989 }
9090
9191 // Validate config file if specified
@@ -152,23 +152,23 @@ public override int Execute([NotNull] CommandContext context, [NotNull] CompareC
152152 }
153153
154154 // Load assemblies
155- logger . LogInformation ( "Loading old assembly: {Path}" , settings . OldAssemblyPath ) ;
156- logger . LogInformation ( "Loading new assembly: {Path}" , settings . NewAssemblyPath ) ;
155+ logger . LogInformation ( "Loading source assembly: {Path}" , settings . SourceAssemblyPath ) ;
156+ logger . LogInformation ( "Loading target assembly: {Path}" , settings . TargetAssemblyPath ) ;
157157
158158 var assemblyLoader = _serviceProvider . GetRequiredService < IAssemblyLoader > ( ) ;
159- var oldAssembly = assemblyLoader . LoadAssembly ( settings . OldAssemblyPath ) ;
160- var newAssembly = assemblyLoader . LoadAssembly ( settings . NewAssemblyPath ) ;
159+ var sourceAssembly = assemblyLoader . LoadAssembly ( settings . SourceAssemblyPath ) ;
160+ var targetAssembly = assemblyLoader . LoadAssembly ( settings . TargetAssemblyPath ) ;
161161
162162 // Extract API information
163163 logger . LogInformation ( "Extracting API information from assemblies" ) ;
164164 var apiExtractor = _serviceProvider . GetRequiredService < IApiExtractor > ( ) ;
165- var oldApi = apiExtractor . ExtractApiMembers ( oldAssembly ) ;
166- var newApi = apiExtractor . ExtractApiMembers ( newAssembly ) ;
165+ var sourceApi = apiExtractor . ExtractApiMembers ( sourceAssembly ) ;
166+ var targetApi = apiExtractor . ExtractApiMembers ( targetAssembly ) ;
167167
168168 // Compare APIs
169169 logger . LogInformation ( "Comparing APIs" ) ;
170170 var apiComparer = _serviceProvider . GetRequiredService < IApiComparer > ( ) ;
171- var comparisonResult = apiComparer . CompareAssemblies ( oldAssembly , newAssembly ) ;
171+ var comparisonResult = apiComparer . CompareAssemblies ( sourceAssembly , targetAssembly ) ;
172172
173173 // Create ApiComparison from ComparisonResult
174174 var comparison = new Models . ApiComparison
0 commit comments