Skip to content

Commit

Permalink
Remove command list-references (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Aug 24, 2023
1 parent 0a54575 commit 7aaaa64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 174 deletions.
115 changes: 0 additions & 115 deletions src/CommandLine/Commands/ListReferencesCommand.cs

This file was deleted.

28 changes: 0 additions & 28 deletions src/CommandLine/Options/ListReferencesCommandLineOptions.cs

This file was deleted.

31 changes: 0 additions & 31 deletions src/CommandLine/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ private static int Main(string[] args)
#if DEBUG
typeof(FindSymbolsCommandLineOptions),
typeof(ListVisualStudioCommandLineOptions),
typeof(ListReferencesCommandLineOptions),
typeof(SlnListCommandLineOptions),
#endif
});
Expand Down Expand Up @@ -201,8 +200,6 @@ private static int Main(string[] args)
#if DEBUG
case FindSymbolsCommandLineOptions findSymbolsCommandLineOptions:
return FindSymbolsAsync(findSymbolsCommandLineOptions).Result;
case ListReferencesCommandLineOptions listReferencesCommandLineOptions:
return ListReferencesAsync(listReferencesCommandLineOptions).Result;
case SlnListCommandLineOptions slnListCommandLineOptions:
return SlnListAsync(slnListCommandLineOptions).Result;
#endif
Expand Down Expand Up @@ -880,34 +877,6 @@ private static int Migrate(MigrateCommandLineOptions options)
return GetExitCode(status);
}

#if DEBUG
private static async Task<int> ListReferencesAsync(ListReferencesCommandLineOptions options)
{
if (!TryParseOptionValueAsEnum(options.Display, OptionNames.Display, out MetadataReferenceDisplay display, MetadataReferenceDisplay.Path))
return ExitCodes.Error;

if (!TryParseOptionValueAsEnumFlags(options.Type, OptionNames.Type, out MetadataReferenceFilter metadataReferenceFilter, MetadataReferenceFilter.Dll | MetadataReferenceFilter.Project))
return ExitCodes.Error;

if (!options.TryGetProjectFilter(out ProjectFilter projectFilter))
return ExitCodes.Error;

if (!TryParsePaths(options.Paths, out ImmutableArray<string> paths))
return ExitCodes.Error;

var command = new ListReferencesCommand(
options,
display,
metadataReferenceFilter,
projectFilter,
FileSystemFilter.CreateOrDefault(options.Include, options.Exclude));

CommandStatus status = await command.ExecuteAsync(paths, options.MSBuildPath, options.Properties);

return GetExitCode(status);
}
#endif

private static bool TryParsePaths(string value, out ImmutableArray<string> paths)
{
return TryParsePaths(ImmutableArray.Create(value), out paths);
Expand Down

0 comments on commit 7aaaa64

Please sign in to comment.