forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maintenance] Migrate SDK generation from autorest C# to autorest Pow…
…erShell (Azure#27145) * migrate Maintenance SDK from autorest csharp to autorest powershell * Migrated the Maintenance SDK for Autorest from C# to PowerShell * Add autorest reset command to README * Update ChangeLog for SDK migration --------- Co-authored-by: NoriZC <110961157+NoriZC@users.noreply.github.com>
- Loading branch information
Showing
65 changed files
with
4,957 additions
and
5,143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 33 additions & 45 deletions
78
...e/Maintenance.Management.Sdk/Generated/ApplyUpdateForResourceGroupOperationsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,49 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
// Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
namespace Microsoft.Azure.Management.Maintenance | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for ApplyUpdateForResourceGroupOperations. | ||
/// Extension methods for ApplyUpdateForResourceGroupOperations | ||
/// </summary> | ||
public static partial class ApplyUpdateForResourceGroupOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Get Configuration records within a subscription and resource group | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource Group Name | ||
/// </param> | ||
public static IEnumerable<ApplyUpdate> List(this IApplyUpdateForResourceGroupOperations operations, string resourceGroupName) | ||
{ | ||
return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); | ||
} | ||
/// <summary> | ||
/// Get Configuration records within a subscription and resource group | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource Group Name | ||
/// </param> | ||
public static System.Collections.Generic.IEnumerable<ApplyUpdate> List(this IApplyUpdateForResourceGroupOperations operations, string resourceGroupName) | ||
{ | ||
return ((IApplyUpdateForResourceGroupOperations)operations).ListAsync(resourceGroupName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Get Configuration records within a subscription and resource group | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource Group Name | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<IEnumerable<ApplyUpdate>> ListAsync(this IApplyUpdateForResourceGroupOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) | ||
/// <summary> | ||
/// Get Configuration records within a subscription and resource group | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource Group Name | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ApplyUpdate>> ListAsync(this IApplyUpdateForResourceGroupOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
{ | ||
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
return _result.Body; | ||
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.