Skip to content

Commit 9b41a8f

Browse files
author
maddieclayton
committed
address comments
1 parent 54421f5 commit 9b41a8f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
1818
using Microsoft.Azure.ServiceManagemenet.Common.Models;
1919
using Microsoft.WindowsAzure.Commands.Common;
20+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2021
using System;
2122
using System.Collections.Concurrent;
2223
using System.Diagnostics;
@@ -700,11 +701,11 @@ public virtual string ImplementationBackgroundJobDescription
700701
string name = "Long Running Azure Operation";
701702
string commandName = MyInvocation?.MyCommand?.Name;
702703
string objectName = null;
703-
if (MyInvocation?.BoundParameters?.ContainsKey("Name") == true)
704+
if (this.IsBound("Name"))
704705
{
705706
objectName = MyInvocation.BoundParameters["Name"].ToString();
706707
}
707-
else if (MyInvocation?.BoundParameters?.ContainsKey("InputObject") == true)
708+
else if (this.IsBound("InputObject") == true)
708709
{
709710
var type = MyInvocation.BoundParameters["InputObject"].GetType();
710711
var inputObject = Convert.ChangeType(MyInvocation.BoundParameters["InputObject"], type);
@@ -721,7 +722,7 @@ public virtual string ImplementationBackgroundJobDescription
721722
}
722723
}
723724
}
724-
else if (MyInvocation?.BoundParameters?.ContainsKey("ResourceId") == true)
725+
else if (this.IsBound("ResourceId") == true)
725726
{
726727
string[] tokens = MyInvocation.BoundParameters["ResourceId"].ToString().Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
727728
if (tokens.Length >= 8)
@@ -734,7 +735,7 @@ public virtual string ImplementationBackgroundJobDescription
734735
{
735736
if (!string.IsNullOrWhiteSpace(objectName))
736737
{
737-
name = string.Format("Long Running Operation for '{0}' : '{1}'", commandName, objectName);
738+
name = string.Format("Long Running Operation for '{0}' on resource '{1}'", commandName, objectName);
738739
}
739740
else
740741
{

0 commit comments

Comments
 (0)