Skip to content

Commit

Permalink
Add validateset attribute for relevant cmdlets (#5073)
Browse files Browse the repository at this point in the history
This pull request adds the `ValidateSet` attribute for three cmdlets,
which will help users quickly discover the available types or setting
names.
  • Loading branch information
Gijsreyn authored Jan 17, 2025
1 parent 53ceda5 commit f4f8abd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public sealed class AddSourceCmdlet : PSCmdlet
[Parameter(
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateSet(
"Microsoft.Rest",
"Microsoft.PreIndexed.Package")]
public string Type { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public sealed class DisableSettingCmdlet : PSCmdlet
Mandatory = true,
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateSet(
"LocalManifestFiles",
"BypassCertificatePinningForMicrosoftStore",
"InstallerHashOverride",
"LocalArchiveMalwareScanOverride",
"ProxyCommandLineOptions")]
public string Name { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public sealed class EnableSettingCmdlet : PSCmdlet
Mandatory = true,
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateSet(
"LocalManifestFiles",
"BypassCertificatePinningForMicrosoftStore",
"InstallerHashOverride",
"LocalArchiveMalwareScanOverride",
"ProxyCommandLineOptions")]
public string Name { get; set; }

/// <summary>
Expand Down

0 comments on commit f4f8abd

Please sign in to comment.