Skip to content

Commit 857b4ee

Browse files
author
testaccount67
committed
Revert "Renaming Get-AzureRmProviderOperation parameter"
This reverts commit 3284daf.
1 parent 14c659b commit 857b4ee

File tree

2 files changed

+9
-10
lines changed

2 files changed

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

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

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

5352
List<PSResourceProviderOperation> operationsToDisplay;
5453

55-
if (this.Name.Contains(WildCardCharacter))
54+
if (this.OperationSearchString.Contains(WildCardCharacter))
5655
{
57-
operationsToDisplay = this.ProcessProviderOperationsWithWildCard(Name);
56+
operationsToDisplay = this.ProcessProviderOperationsWithWildCard(OperationSearchString);
5857
}
5958
else
6059
{
61-
operationsToDisplay = this.ProcessProviderOperationsWithoutWildCard(Name);
60+
operationsToDisplay = this.ProcessProviderOperationsWithoutWildCard(OperationSearchString);
6261
}
6362

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

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

0 commit comments

Comments
 (0)