39 references to Parents
dotnet (3)
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.Help.cs (1)
63nextCommand = nextCommand.Parents.FirstOrDefault(c => c is Command) as Command;
Parser.cs (2)
395Command? listCommand = command.Parents.Single() as Command; 435current = current.Parents.FirstOrDefault(p => p is Command) as Command;
Microsoft.DotNet.Cli.Definitions (18)
Commands\Hidden\Add\AddPackageCommandDefinition.cs (1)
13public AddCommandDefinition Parent => (AddCommandDefinition)Parents.Single();
Commands\Hidden\Add\AddReferenceCommandDefinition.cs (1)
28public AddCommandDefinition Parent => (AddCommandDefinition)Parents.Single();
Commands\Hidden\List\ListPackageCommandDefinition.cs (1)
13public ListCommandDefinition Parent => (ListCommandDefinition)Parents.Single();
Commands\Hidden\List\ListReferenceCommandDefinition.cs (1)
19public ListCommandDefinition Parent => (ListCommandDefinition)Parents.Single();
Commands\Hidden\Remove\RemovePackageCommandDefinition.cs (1)
13public RemoveCommandDefinition Parent => (RemoveCommandDefinition)Parents.Single();
Commands\Hidden\Remove\RemoveReferenceCommandDefinition.cs (1)
13public RemoveCommandDefinition Parent => (RemoveCommandDefinition)Parents.Single();
Commands\Reference\ReferenceAddCommandDefinition.cs (1)
14public ReferenceCommandDefinition Parent => (ReferenceCommandDefinition)Parents.Single();
Commands\Reference\ReferenceListCommandDefinition.cs (1)
14public ReferenceCommandDefinition Parent => (ReferenceCommandDefinition)Parents.Single();
Commands\Reference\ReferenceRemoveCommandDefinition.cs (1)
12public ReferenceCommandDefinition Parent => (ReferenceCommandDefinition)Parents.Single();
Commands\Solution\SolutionAddCommandDefinition.cs (1)
46public SolutionCommandDefinition Parent => (SolutionCommandDefinition)Parents.Single();
Commands\Solution\SolutionListCommandDefinition.cs (1)
22public SolutionCommandDefinition Parent => (SolutionCommandDefinition)Parents.Single();
Commands\Solution\SolutionMigrateCommandDefinition.cs (1)
15public SolutionCommandDefinition Parent => (SolutionCommandDefinition)Parents.Single();
Commands\Solution\SolutionRemoveCommandDefinition.cs (1)
23public SolutionCommandDefinition Parent => (SolutionCommandDefinition)Parents.Single();
Commands\Workload\WorkloadSearchVersionsCommandDefinition.cs (1)
63=> (WorkloadSearchCommandDefinition)Parents.Single();
Help\HelpBuilder.cs (2)
394RecurseWhileNotNull(command, c => c.Parents.OfType<Command>().FirstOrDefault()) 434RecurseWhileNotNull(command, c => c.Parents.OfType<Command>().FirstOrDefault())
Help\HelpBuilder.Default.cs (1)
179foreach (Symbol parent in current.Parents)
Utilities\CommandExtensions.cs (1)
11=> command.Parents.FirstOrDefault(p => p is Command) is Command parentCommand ? GetRootCommand(parentCommand) : command;
Microsoft.TemplateEngine.Cli (9)
Commands\CommandLineUtils.cs (2)
60argument.Parents.Count() > 1; 120option.Parents.Count() > 1;
Commands\create\InstantiateCommand.Help.cs (2)
378command = command.Parents.FirstOrDefault(c => c is Command) as Command; 485nextCommand = nextCommand.Parents.FirstOrDefault(c => c is Command) as Command;
Commands\create\TemplateCommandArgs.cs (1)
135currentCommand = currentCommand.Parents.OfType<Command>().SingleOrDefault();
Commands\Example.cs (2)
41nextCommand = nextCommand.Parents.OfType<Command>().FirstOrDefault(); 55next = next?.Parents.OfType<Command>().FirstOrDefault();
Commands\list\ListCommandArgs.cs (1)
22var newCommand = (NewCommand)command.Parents.Single();
Commands\search\SearchCommandArgs.cs (1)
22var newCommand = (NewCommand)command.Parents.Single();
System.CommandLine (5)
Argument.cs (2)
143var command = Parents.FlattenBreadthFirst(x => x.Parents)
Help\HelpBuilder.cs (2)
128.RecurseWhileNotNull(c => c.Parents.OfType<Command>().FirstOrDefault()) 169.RecurseWhileNotNull(c => c.Parents.OfType<Command>().FirstOrDefault())
Help\HelpBuilder.Default.cs (1)
251foreach (Symbol parent in current.Parents)
System.CommandLine.StaticCompletions (4)
HelpGenerationExtensions.cs (3)
80if (c.Parents.Count() == 0) 87return myOptions.Concat(c.Parents.OfType<Command>().SelectMany(OptionsForParent)).DistinctBy(o => o.Name); 100foreach (var p in c.Parents.OfType<Command>())
shells\ZshShellProvider.cs (1)
196var parentArguments = command.Parents.OfType<Command>().SelectMany(parent => parent.Arguments).Select(arg => arg.Name).ToHashSet();