Skip to content

Commit b327f02

Browse files
committed
Fixing pipeline usability issues
1 parent d43dab7 commit b327f02

18 files changed

+68
-47
lines changed

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/GetAzureRemoteAppCollection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2626
public class GetAzureRemoteAppCollection : RdsCmdlet
2727
{
2828
[Parameter(Mandatory = false,
29-
Position = 1,
29+
Position = 0,
30+
ValueFromPipelineByPropertyName = true,
3031
HelpMessage = "RemoteApp collection name. Wildcards are permitted.")]
3132
[ValidatePattern(NameValidatorStringWithWildCards)]
33+
[Alias("Name")]
3234
public string CollectionName { get; set; }
3335

3436
private bool showAllCollections = false;

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/GetAzureRemoteAppCollectionUsageDetails.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,23 @@
1717
using Microsoft.Azure.Management.RemoteApp.Models;
1818
using System;
1919
using System.Collections.ObjectModel;
20-
using System.Management.Automation;
2120
using System.IO;
22-
using System.Linq;
2321
using System.Management.Automation;
2422
using System.Net;
2523

24+
2625
namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2726
{
2827

2928
[Cmdlet(VerbsCommon.Get, "AzureRemoteAppCollectionUsageDetails"), OutputType(typeof(string))]
3029
public class GetAzureRemoteAppCollectionUsageDetails : RdsCmdlet
3130
{
32-
[Parameter(
33-
Position = 0,
34-
Mandatory = true,
35-
ValueFromPipelineByPropertyName = true,
36-
HelpMessage = "RemoteApp collection name")]
31+
[Parameter(Mandatory = true,
32+
Position = 0,
33+
ValueFromPipelineByPropertyName = true,
34+
HelpMessage = "RemoteApp collection name")]
3735
[ValidatePattern(NameValidatorString)]
36+
[Alias("Name")]
3837
public string CollectionName { get; set; }
3938

4039
[Parameter(Mandatory = false,
@@ -62,7 +61,6 @@ private void GetPublishedUsageDetails(CollectionUsageDetailsResult detailsUsage)
6261
// The request is async and we have to wait for the usage details to be produced here
6362
do
6463
{
65-
6664
System.Threading.Thread.Sleep(5000);
6765

6866
operationResult = CallClient(() => Client.OperationResults.Get(detailsUsage.UsageDetails.OperationTrackingId), Client.OperationResults);

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/GetAzureRemoteAppCollectionUsageSummary.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2727
public class GetAzureRemoteAppCollectionUsageSummary : RdsCmdlet
2828
{
2929
[Parameter(Mandatory = true,
30-
Position = 0,
31-
ValueFromPipelineByPropertyName = true,
32-
HelpMessage = "RemoteApp collection name")]
30+
Position = 0,
31+
ValueFromPipelineByPropertyName = true,
32+
HelpMessage = "RemoteApp collection name")]
3333
[ValidatePattern(NameValidatorString)]
34+
[Alias("Name")]
3435
public string CollectionName { get; set; }
3536

3637
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/NewAzureRemoteAppCollection.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ public class NewAzureRemoteAppCollection : RdsCmdlet
3232
private const string NoDomain = "NoDomain";
3333
private const string AzureVNet = "AzureVNet";
3434

35-
[Parameter (Mandatory = true,
36-
Position = 0,
37-
HelpMessage = "RemoteApp collection name")]
38-
[ValidatePattern (NameValidatorString)]
35+
[Parameter(Mandatory = true,
36+
Position = 0,
37+
ValueFromPipelineByPropertyName = true,
38+
HelpMessage = "RemoteApp collection name")]
39+
[ValidatePattern(NameValidatorString)]
40+
[Alias("Name")]
3941
public string CollectionName { get; set; }
4042

4143
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/RemoveAzureRemoteAppCollection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ public class RemoveAzureRemoteAppCollection : RdsCmdlet
2323
{
2424
[Parameter(Mandatory = true,
2525
Position = 0,
26+
ValueFromPipelineByPropertyName = true,
2627
HelpMessage = "RemoteApp collection name")]
2728
[ValidatePattern(NameValidatorString)]
29+
[Alias("Name")]
2830
public string CollectionName { get; set; }
2931

3032
public override void ExecuteCmdlet()

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/SetAzureRemoteAppCollection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public class SetAzureRemoteAppCollection : RdsCmdlet
2929

3030
[Parameter(Mandatory = true,
3131
Position = 0,
32+
ValueFromPipelineByPropertyName = true,
3233
HelpMessage = "RemoteApp collection name")]
3334
[ValidatePattern(NameValidatorString)]
35+
[Alias("Name")]
3436
public string CollectionName { get; set; }
3537

3638
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2222

2323
public class UpdateAzureRemoteAppCollection : RdsCmdlet
2424
{
25-
[Parameter (Mandatory = true,
26-
Position = 0,
27-
HelpMessage = "RemoteApp collection name")]
28-
[ValidatePattern (NameValidatorString)]
25+
[Parameter(Mandatory = true,
26+
Position = 0,
27+
ValueFromPipelineByPropertyName = true,
28+
HelpMessage = "RemoteApp collection name")]
29+
[ValidatePattern(NameValidatorString)]
30+
[Alias("Name")]
2931
public string CollectionName { get; set; }
3032

31-
3233
[Parameter(Mandatory = true,
3334
Position = 1,
3435
ValueFromPipelineByPropertyName = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/OperationalResult/GetAzureRemoteAppOperationResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class GetAzureRemoteAppOperationResult : RdsCmdlet
2424
{
2525
[Parameter(Mandatory = true,
2626
Position = 0,
27+
ValueFromPipelineByPropertyName = true,
2728
HelpMessage = "Operation Identifier")]
28-
2929
public string TrackingId { get; set; }
3030

3131
public override void ExecuteCmdlet()

src/ServiceManagement/RemoteApp/Commands.RemoteApp/RemoteProgram/GetAzureRemoteAppProgram.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ public class GetAzureRemoteAppProgram : RdsCmdlet
2929
private const string FilterByAlias = "FilterByAlias";
3030

3131
[Parameter(Mandatory = true,
32-
Position = 0,
33-
HelpMessage = "RemoteApp collection name")]
32+
Position = 0,
33+
ValueFromPipelineByPropertyName = true,
34+
HelpMessage = "RemoteApp collection name")]
3435
[ValidatePattern(NameValidatorString)]
36+
[Alias("Name")]
3537
public string CollectionName { get; set; }
3638

3739
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/RemoteProgram/GetStartMenuProgram.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2525
[Cmdlet(VerbsCommon.Get, "AzureRemoteAppStartMenuProgram"), OutputType(typeof(StartMenuApplication))]
2626
public class GetStartMenuProgram : RdsCmdlet
2727
{
28-
[Parameter (Mandatory = true,
29-
Position = 0,
30-
HelpMessage = "RemoteApp collection name")]
31-
[ValidatePattern (NameValidatorString)]
28+
[Parameter(Mandatory = true,
29+
Position = 0,
30+
ValueFromPipelineByPropertyName = true,
31+
HelpMessage = "RemoteApp collection name")]
32+
[ValidatePattern(NameValidatorString)]
33+
[Alias("Name")]
3234
public string CollectionName { get; set; }
3335

3436
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/RemoteProgram/PublishAzureRemoteAppProgram.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ public class PublishAzureRemoteAppProgram : RdsCmdlet
2626
private const string AppPath = "App Path";
2727
private const string AppId = "App Id";
2828

29-
[Parameter (Mandatory = true,
30-
Position = 0,
31-
HelpMessage = "RemoteApp collection name")]
32-
[ValidatePattern (NameValidatorString)]
29+
[Parameter(Mandatory = true,
30+
Position = 0,
31+
ValueFromPipelineByPropertyName = true,
32+
HelpMessage = "RemoteApp collection name")]
33+
[ValidatePattern(NameValidatorString)]
34+
[Alias("Name")]
3335
public string CollectionName { get; set; }
3436

3537
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/RemoteProgram/UnpublishAzureRemoteAppProgram.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2323
[Cmdlet(VerbsData.Unpublish, "AzureRemoteAppProgram", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(PublishingOperationResult))]
2424
public class UnpublishAzureRemoteAppProgram : RdsCmdlet
2525
{
26-
[Parameter (Mandatory = true,
27-
Position = 0,
28-
HelpMessage = "RemoteApp collection name")]
29-
[ValidatePattern (NameValidatorString)]
26+
[Parameter(Mandatory = true,
27+
Position = 0,
28+
ValueFromPipelineByPropertyName = true,
29+
HelpMessage = "RemoteApp collection name")]
30+
[ValidatePattern(NameValidatorString)]
31+
[Alias("Name")]
3032
public string CollectionName { get; set; }
3133

3234
[Parameter(Mandatory = false,
33-
Position = 1,
35+
Position = 1,
36+
ValueFromPipelineByPropertyName = true,
3437
HelpMessage = "Aliases of the programs to unpublish")]
3538
[ValidateNotNullOrEmpty()]
3639
public string[] Alias { get; set; }

src/ServiceManagement/RemoteApp/Commands.RemoteApp/SecurityPrincipals/GetAzureRemoteAppUser.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2626
[Cmdlet(VerbsCommon.Get, "AzureRemoteAppUser"), OutputType(typeof(ConsentStatusModel))]
2727
public class GetAzureRemoteAppUser : RdsCmdlet
2828
{
29-
[Parameter (Mandatory = true,
30-
Position = 0,
31-
HelpMessage = "RemoteApp collection name")]
32-
[ValidatePattern (NameValidatorString)]
29+
[Parameter(Mandatory = true,
30+
Position = 0,
31+
ValueFromPipelineByPropertyName = true,
32+
HelpMessage = "RemoteApp collection name")]
33+
[ValidatePattern(NameValidatorString)]
34+
[Alias("Name")]
3335
public string CollectionName { get; set; }
3436

3537
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/SecurityPrincipals/SecurityPrincipals.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2323
public class SecurityPrincipals : RdsCmdlet
2424
{
2525
[Parameter(Mandatory = true,
26-
Position = 0,
27-
HelpMessage = "RemoteApp collection name")]
26+
Position = 0,
27+
ValueFromPipelineByPropertyName = true,
28+
HelpMessage = "RemoteApp collection name")]
2829
[ValidatePattern(NameValidatorString)]
30+
[Alias("Name")]
2931
public string CollectionName { get; set; }
3032

3133
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Sessions/DisconnectAzureRemoteAppSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public class DisconnectAzureRemoteAppSession : RdsCmdlet
2424
{
2525
[Parameter(Mandatory = true,
2626
Position = 0,
27-
ValueFromPipeline = true,
2827
ValueFromPipelineByPropertyName = true,
2928
HelpMessage = "RemoteApp collection name")]
3029
[ValidatePattern(NameValidatorString)]
30+
[Alias("Name")]
3131
public string CollectionName { get; set; }
3232

3333
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Sessions/GetAzureRemoteAppSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public class GetAzureRemoteAppSession : RdsCmdlet
2525
{
2626
[Parameter(Mandatory = true,
2727
Position = 0,
28-
ValueFromPipeline = true,
2928
ValueFromPipelineByPropertyName = true,
3029
HelpMessage = "RemoteApp collection name")]
3130
[ValidatePattern(NameValidatorString)]
31+
[Alias("Name")]
3232
public string CollectionName { get; set; }
3333

3434
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Sessions/InvokeAzureRemoteAppSessionLogoff.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public class InvokeAzureRemoteAppSessionLogoff : RdsCmdlet
2525
{
2626
[Parameter(Mandatory = true,
2727
Position = 0,
28-
ValueFromPipeline = true,
2928
ValueFromPipelineByPropertyName = true,
3029
HelpMessage = "RemoteApp collection name")]
3130
[ValidatePattern(NameValidatorString)]
31+
[Alias("Name")]
3232
public string CollectionName { get; set; }
3333

3434
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Sessions/SendAzureRemoteAppSessionMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public class SendAzureRemoteAppSessionMessage : RdsCmdlet
2424
{
2525
[Parameter(Mandatory = true,
2626
Position = 0,
27-
ValueFromPipeline = true,
2827
ValueFromPipelineByPropertyName = true,
2928
HelpMessage = "RemoteApp collection name")]
3029
[ValidatePattern(NameValidatorString)]
30+
[Alias("Name")]
3131
public string CollectionName { get; set; }
3232

3333
[Parameter(Mandatory = true,

0 commit comments

Comments
 (0)