File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/Common/Commands.Common.Storage Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,20 @@ public List<string> AuthenticationKeys
65
65
get { return _authenticationKeys ; }
66
66
}
67
67
68
- public static string ParseResourceGroupFromId ( string idFromServer )
68
+ /// <summary>
69
+ /// Get the resource group name from a storage account resource Id
70
+ /// </summary>
71
+ /// <param name="resourceId">The resource Id for the storage account</param>
72
+ /// <returns>The resource group containing the storage account</returns>
73
+ public static string ParseResourceGroupFromId ( string resourceId )
69
74
{
70
- if ( ! string . IsNullOrEmpty ( idFromServer ) )
75
+ if ( ! string . IsNullOrEmpty ( resourceId ) )
71
76
{
72
- string [ ] tokens = idFromServer . Split ( new [ ] { '/' } , StringSplitOptions . RemoveEmptyEntries ) ;
77
+ string [ ] tokens = resourceId . Split ( new [ ] { '/' } , StringSplitOptions . RemoveEmptyEntries ) ;
78
+ if ( tokens == null || tokens . Length < 4 )
79
+ {
80
+ throw new ArgumentOutOfRangeException ( "resourceId" ) ;
81
+ }
73
82
74
83
return tokens [ 3 ] ;
75
84
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ namespace Microsoft.WindowsAzure.Commands.Common.Storage
20
20
public interface IStorageService
21
21
{
22
22
/// <summary>
23
- /// The eblob service endpoint
23
+ /// The blob service endpoint
24
24
/// </summary>
25
25
Uri BlobEndpoint { get ; }
26
26
You can’t perform that action at this time.
0 commit comments