Skip to content

Commit 21ad069

Browse files
committed
FW:updating to use the PSArgumentCompleter attribute instead of validateSet
Removing ignorecase - fixing build
1 parent d5bfdf4 commit 21ad069

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ResourceManager/Websites/Commands.Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.WebApps.Utilities;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.WebSites.Models;
1718
using System.Management.Automation;
1819
using System.Text.RegularExpressions;
@@ -33,14 +34,14 @@ public class SetAzureAppServicePlanCmdlet : AppServicePlanBaseCmdlet
3334
public string AdminSiteName { get; set; }
3435

3536
[Parameter(ParameterSetName = ParameterSet1Name, Position = 3, Mandatory = false, HelpMessage = "The App Service plan tier. Allowed values are [Free|Shared|Basic|Standard|Premium|PremiumV2]")]
36-
[ValidateSet("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Isolated",IgnoreCase = true)]
37+
[PSArgumentCompleter("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Isolated")]
3738
public string Tier { get; set; }
3839

3940
[Parameter(ParameterSetName = ParameterSet1Name, Position = 4, Mandatory = false, HelpMessage = "Number of Workers to be allocated.")]
4041
public int NumberofWorkers { get; set; }
4142

4243
[Parameter(ParameterSetName = ParameterSet1Name, Position = 5, Mandatory = false, HelpMessage = "Size of workers to be allocated. Allowed values are [Small|Medium|Large|ExtraLarge]")]
43-
[ValidateSet("Small", "Medium", "Large", "ExtraLarge", IgnoreCase = true)]
44+
[PSArgumentCompleter("Small", "Medium", "Large", "ExtraLarge")]
4445
public string WorkerSize { get; set; }
4546

4647
[Parameter(ParameterSetName = ParameterSet1Name, Mandatory = false, HelpMessage = "Whether or not to enable Per Site Scaling")]

0 commit comments

Comments
 (0)