17
17
using Microsoft . Azure . Commands . Common . Authentication . Abstractions ;
18
18
using Microsoft . Azure . ServiceManagemenet . Common . Models ;
19
19
using Microsoft . WindowsAzure . Commands . Common ;
20
+ using Microsoft . WindowsAzure . Commands . Utilities . Common ;
20
21
using System ;
21
22
using System . Collections . Concurrent ;
22
23
using System . Diagnostics ;
@@ -700,11 +701,11 @@ public virtual string ImplementationBackgroundJobDescription
700
701
string name = "Long Running Azure Operation" ;
701
702
string commandName = MyInvocation ? . MyCommand ? . Name ;
702
703
string objectName = null ;
703
- if ( MyInvocation ? . BoundParameters ? . ContainsKey ( "Name" ) == true )
704
+ if ( this . IsBound ( "Name" ) )
704
705
{
705
706
objectName = MyInvocation . BoundParameters [ "Name" ] . ToString ( ) ;
706
707
}
707
- else if ( MyInvocation ? . BoundParameters ? . ContainsKey ( "InputObject" ) == true )
708
+ else if ( this . IsBound ( "InputObject" ) == true )
708
709
{
709
710
var type = MyInvocation . BoundParameters [ "InputObject" ] . GetType ( ) ;
710
711
var inputObject = Convert . ChangeType ( MyInvocation . BoundParameters [ "InputObject" ] , type ) ;
@@ -721,7 +722,7 @@ public virtual string ImplementationBackgroundJobDescription
721
722
}
722
723
}
723
724
}
724
- else if ( MyInvocation ? . BoundParameters ? . ContainsKey ( "ResourceId" ) == true )
725
+ else if ( this . IsBound ( "ResourceId" ) == true )
725
726
{
726
727
string [ ] tokens = MyInvocation . BoundParameters [ "ResourceId" ] . ToString ( ) . Split ( new [ ] { '/' } , StringSplitOptions . RemoveEmptyEntries ) ;
727
728
if ( tokens . Length >= 8 )
@@ -734,7 +735,7 @@ public virtual string ImplementationBackgroundJobDescription
734
735
{
735
736
if ( ! string . IsNullOrWhiteSpace ( objectName ) )
736
737
{
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 ) ;
738
739
}
739
740
else
740
741
{
0 commit comments