-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-IntelliSensetab completiontab completion
Description
Summary of the new feature/enhancement
As a PowerShell user, I want [ValidateSet] to support a dynamically generated sets from script blocks so that I can make terse, reusable sets of data, and my coworkers are provided useful IntelliSense from my work. In issue #3744, it was proposed to support a dynamically generated set for [ValidateSet]. An example was given with a script block, which would resolve the set. However, the actual merged PR laid the groundwork and implemented a variant, using classes and interfaces. I'd like this issue to specifically track the ability to use [ValidateSet] with a script block and receive IntelliSense feedback.
Proposed technical implementation details
For example:
[CmdletBinding()]
param (
[ValidateSet({ (Get-MyGitRepos -Code -Config).master })]
$Repo = "foo"
)vexx32, FireInWinter, crodrigocs, ephos, affieuk and 2 more
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-IntelliSensetab completiontab completion