Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
[Cmdlet("Export", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ResourceGroup", SupportsShouldProcess = true), OutputType(typeof(PSObject))]
public class ExportAzureResourceGroupCmdlet : ResourceManagerCmdletBaseWithApiVersion
{
/// <summary>
/// Adding a hard-coded API version to be used when there is no value provided for 'ApiVersion' parameter.
/// This is a temporary change until we update the cmdlet to use .NET SDK based client.
/// </summary>
private const string DefaultApiVersion = "2020-06-01";

/// <summary>
/// Gets or sets the resource group name parameter.
/// </summary>
Expand Down Expand Up @@ -116,9 +110,9 @@ protected override void OnProcessRecord()

var resourceGroupId = this.GetResourceGroupId();

if (this.IsParameterBound(c => c.ApiVersion))
if (! this.IsParameterBound(c => c.ApiVersion))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - extra space

{
var parameters = new Management.ResourceManager.Models.ExportTemplateRequest
var parameters = new ExportTemplateRequest
{
Resources = this.GetResourcesFilter(resourceGroupId: resourceGroupId),
Options = this.GetExportOptions(),
Expand Down Expand Up @@ -147,7 +141,7 @@ protected override void OnProcessRecord()
Resources = this.GetResourcesFilter(resourceGroupId: resourceGroupId),
Options = this.GetExportOptions(),
};
var apiVersion = this.ApiVersion ?? DefaultApiVersion;
var apiVersion = this.ApiVersion;
var operationResult = this.GetResourcesClient()
.InvokeActionOnResource<JObject>(
resourceId: resourceGroupId,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.