Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove command list-references #1185

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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