Skip to content

Commit 5522206

Browse files
IParameters: DefaultLocation property.
1 parent 9cef8d5 commit 5522206

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

src/ResourceManager/Common/Commands.Common.Strategies.UnitTest/AsyncCmdletExtensionsTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class RG { }
2020

2121
class Parameters : IParameters<RG>
2222
{
23+
public string DefaultLocation => "eastus";
24+
2325
public string Location
2426
{
2527
get

src/ResourceManager/Common/Commands.Common.Strategies/IParameters.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public interface IParameters<TModel>
2828
/// </summary>
2929
string Location { get; set; }
3030

31+
/// <summary>
32+
/// Default location. It's used if Location is null and it can't be infered.
33+
/// </summary>
34+
string DefaultLocation { get; }
35+
3136
/// <summary>
3237
/// Create an Azure resource configuration according to the parameters.
3338
/// </summary>

src/ResourceManager/Compute/Commands.Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ public string Location
146146

147147
public ImageAndOsType ImageAndOsType { get; set; }
148148

149+
public string DefaultLocation => "eastus";
150+
149151
public async Task<ResourceConfig<VirtualMachineScaleSet>> CreateConfigAsync()
150152
{
151153
ImageAndOsType = await _client.UpdateImageAndOsTypeAsync(

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ public string Location
260260
set { _cmdlet.Location = value; }
261261
}
262262

263+
public string DefaultLocation => "eastus";
264+
263265
public BlobUri DestinationUri;
264266

265267
public async Task<ResourceConfig<VirtualMachine>> CreateConfigAsync()

0 commit comments

Comments
 (0)