Skip to content

Commit 3284daf

Browse files
author
testaccount67
committed
Renaming Get-AzureRmProviderOperation parameter
1 parent ec0c4aa commit 3284daf

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@
12831283
<command:syntaxItem>
12841284
<maml:name>Get-AzureRmProviderOperation</maml:name>
12851285
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
1286-
<maml:name>OperationSearchString</maml:name>
1286+
<maml:name>Name</maml:name>
12871287
<maml:description>
12881288
<maml:para>The operation search string (with possible wildcard (*) characters)</maml:para>
12891289
</maml:description>
@@ -1307,7 +1307,7 @@
13071307
</command:syntax>
13081308
<command:parameters>
13091309
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
1310-
<maml:name>OperationSearchString</maml:name>
1310+
<maml:name>Name</maml:name>
13111311
<maml:description>
13121312
<maml:para>The operation search string (with possible wildcard (*) characters)</maml:para>
13131313
</maml:description>

src/ResourceManager/Resources/Commands.Resources/Providers/GetAzureProviderOperationCmdlet.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ public class GetAzureProviderOperationCommand : ResourcesBaseCmdlet
3434
/// <summary>
3535
/// Gets or sets the provider namespace
3636
/// </summary>
37+
[Alias("OperationSearchString")]
3738
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = false, ValueFromPipeline = true, HelpMessage = "The action string.")]
3839
[ValidateNotNullOrEmpty]
39-
public string OperationSearchString { get; set; }
40+
public string Name { get; set; }
4041

4142
/// <summary>
4243
/// Executes the cmdlet
@@ -45,19 +46,19 @@ public override void ExecuteCmdlet()
4546
{
4647
WriteWarning("The output object type of this cmdlet will be modified in a future release.");
4748
// remove leading and trailing whitespaces
48-
this.OperationSearchString = this.OperationSearchString.Trim();
49+
this.Name = this.Name.Trim();
4950

50-
ValidateActionSearchString(this.OperationSearchString);
51+
ValidateActionSearchString(this.Name);
5152

5253
List<PSResourceProviderOperation> operationsToDisplay;
5354

54-
if (this.OperationSearchString.Contains(WildCardCharacter))
55+
if (this.Name.Contains(WildCardCharacter))
5556
{
56-
operationsToDisplay = this.ProcessProviderOperationsWithWildCard(OperationSearchString);
57+
operationsToDisplay = this.ProcessProviderOperationsWithWildCard(Name);
5758
}
5859
else
5960
{
60-
operationsToDisplay = this.ProcessProviderOperationsWithoutWildCard(OperationSearchString);
61+
operationsToDisplay = this.ProcessProviderOperationsWithoutWildCard(Name);
6162
}
6263

6364
this.WriteObject(operationsToDisplay, enumerateCollection: true);
@@ -91,7 +92,7 @@ private List<PSResourceProviderOperation> ProcessProviderOperationsWithWildCard(
9192
WildcardPattern wildcard = new WildcardPattern(actionSearchString, WildcardOptions.IgnoreCase | WildcardOptions.Compiled);
9293

9394
List<ProviderOperationsMetadata> providers = new List<ProviderOperationsMetadata>();
94-
string provider = this.OperationSearchString.Split(Separator).First();
95+
string provider = this.Name.Split(Separator).First();
9596
if (provider.Equals(WildCardCharacter))
9697
{
9798
// 'Get-AzureRmProviderOperation *' or 'Get-AzureRmProviderOperation */virtualmachines/*'

0 commit comments

Comments
 (0)