|
1 |
| -// <auto-generated> |
2 | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
3 |
| -// Licensed under the MIT License. See License.txt in the project root for |
4 |
| -// license information. |
5 |
| -// |
| 2 | +// Licensed under the MIT License. See License.txt in the project root for license information. |
6 | 3 | // Code generated by Microsoft (R) AutoRest Code Generator.
|
7 |
| -// Changes may cause incorrect behavior and will be lost if the code is |
8 |
| -// regenerated. |
9 |
| -// </auto-generated> |
10 |
| - |
| 4 | +// Changes may cause incorrect behavior and will be lost if the code is regenerated. |
11 | 5 | namespace Microsoft.Azure.Management.Storage
|
12 | 6 | {
|
13 |
| - using Microsoft.Rest; |
14 | 7 | using Microsoft.Rest.Azure;
|
15 | 8 | using Models;
|
16 |
| - using System.Threading; |
17 |
| - using System.Threading.Tasks; |
18 | 9 |
|
19 | 10 | /// <summary>
|
20 |
| - /// Extension methods for DeletedAccountsOperations. |
| 11 | + /// Extension methods for DeletedAccountsOperations |
21 | 12 | /// </summary>
|
22 | 13 | public static partial class DeletedAccountsOperationsExtensions
|
23 | 14 | {
|
24 |
| - /// <summary> |
25 |
| - /// Lists deleted accounts under the subscription. |
26 |
| - /// </summary> |
27 |
| - /// <param name='operations'> |
28 |
| - /// The operations group for this extension method. |
29 |
| - /// </param> |
30 |
| - public static IPage<DeletedAccount> List(this IDeletedAccountsOperations operations) |
31 |
| - { |
32 |
| - return operations.ListAsync().GetAwaiter().GetResult(); |
33 |
| - } |
34 |
| - |
35 |
| - /// <summary> |
36 |
| - /// Lists deleted accounts under the subscription. |
37 |
| - /// </summary> |
38 |
| - /// <param name='operations'> |
39 |
| - /// The operations group for this extension method. |
40 |
| - /// </param> |
41 |
| - /// <param name='cancellationToken'> |
42 |
| - /// The cancellation token. |
43 |
| - /// </param> |
44 |
| - public static async Task<IPage<DeletedAccount>> ListAsync(this IDeletedAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) |
45 |
| - { |
46 |
| - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) |
47 |
| - { |
48 |
| - return _result.Body; |
49 |
| - } |
50 |
| - } |
| 15 | + /// <summary> |
| 16 | + /// Lists deleted accounts under the subscription. |
| 17 | + /// </summary> |
| 18 | + /// <param name='operations'> |
| 19 | + /// The operations group for this extension method. |
| 20 | + /// </param> |
| 21 | + public static Microsoft.Rest.Azure.IPage<DeletedAccount> List(this IDeletedAccountsOperations operations) |
| 22 | + { |
| 23 | + return ((IDeletedAccountsOperations)operations).ListAsync().GetAwaiter().GetResult(); |
| 24 | + } |
51 | 25 |
|
52 |
| - /// <summary> |
53 |
| - /// Get properties of specified deleted account resource. |
54 |
| - /// </summary> |
55 |
| - /// <param name='operations'> |
56 |
| - /// The operations group for this extension method. |
57 |
| - /// </param> |
58 |
| - /// <param name='deletedAccountName'> |
59 |
| - /// Name of the deleted storage account. |
60 |
| - /// </param> |
61 |
| - /// <param name='location'> |
62 |
| - /// The location of the deleted storage account. |
63 |
| - /// </param> |
64 |
| - public static DeletedAccount Get(this IDeletedAccountsOperations operations, string deletedAccountName, string location) |
| 26 | + /// <summary> |
| 27 | + /// Lists deleted accounts under the subscription. |
| 28 | + /// </summary> |
| 29 | + /// <param name='operations'> |
| 30 | + /// The operations group for this extension method. |
| 31 | + /// </param> |
| 32 | + /// <param name='cancellationToken'> |
| 33 | + /// The cancellation token. |
| 34 | + /// </param> |
| 35 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedAccount>> ListAsync(this IDeletedAccountsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 36 | + { |
| 37 | + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) |
65 | 38 | {
|
66 |
| - return operations.GetAsync(deletedAccountName, location).GetAwaiter().GetResult(); |
| 39 | + return _result.Body; |
67 | 40 | }
|
| 41 | + } |
| 42 | + /// <summary> |
| 43 | + /// Get properties of specified deleted account resource. |
| 44 | + /// </summary> |
| 45 | + /// <param name='operations'> |
| 46 | + /// The operations group for this extension method. |
| 47 | + /// </param> |
| 48 | + /// <param name='deletedAccountName'> |
| 49 | + /// Name of the deleted storage account. |
| 50 | + /// </param> |
| 51 | + /// <param name='location'> |
| 52 | + /// The location of the deleted storage account. |
| 53 | + /// </param> |
| 54 | + public static DeletedAccount Get(this IDeletedAccountsOperations operations, string deletedAccountName, string location) |
| 55 | + { |
| 56 | + return ((IDeletedAccountsOperations)operations).GetAsync(deletedAccountName, location).GetAwaiter().GetResult(); |
| 57 | + } |
68 | 58 |
|
69 |
| - /// <summary> |
70 |
| - /// Get properties of specified deleted account resource. |
71 |
| - /// </summary> |
72 |
| - /// <param name='operations'> |
73 |
| - /// The operations group for this extension method. |
74 |
| - /// </param> |
75 |
| - /// <param name='deletedAccountName'> |
76 |
| - /// Name of the deleted storage account. |
77 |
| - /// </param> |
78 |
| - /// <param name='location'> |
79 |
| - /// The location of the deleted storage account. |
80 |
| - /// </param> |
81 |
| - /// <param name='cancellationToken'> |
82 |
| - /// The cancellation token. |
83 |
| - /// </param> |
84 |
| - public static async Task<DeletedAccount> GetAsync(this IDeletedAccountsOperations operations, string deletedAccountName, string location, CancellationToken cancellationToken = default(CancellationToken)) |
| 59 | + /// <summary> |
| 60 | + /// Get properties of specified deleted account resource. |
| 61 | + /// </summary> |
| 62 | + /// <param name='operations'> |
| 63 | + /// The operations group for this extension method. |
| 64 | + /// </param> |
| 65 | + /// <param name='deletedAccountName'> |
| 66 | + /// Name of the deleted storage account. |
| 67 | + /// </param> |
| 68 | + /// <param name='location'> |
| 69 | + /// The location of the deleted storage account. |
| 70 | + /// </param> |
| 71 | + /// <param name='cancellationToken'> |
| 72 | + /// The cancellation token. |
| 73 | + /// </param> |
| 74 | + public static async System.Threading.Tasks.Task<DeletedAccount> GetAsync(this IDeletedAccountsOperations operations, string deletedAccountName, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 75 | + { |
| 76 | + using (var _result = await operations.GetWithHttpMessagesAsync(deletedAccountName, location, null, cancellationToken).ConfigureAwait(false)) |
85 | 77 | {
|
86 |
| - using (var _result = await operations.GetWithHttpMessagesAsync(deletedAccountName, location, null, cancellationToken).ConfigureAwait(false)) |
87 |
| - { |
88 |
| - return _result.Body; |
89 |
| - } |
| 78 | + return _result.Body; |
90 | 79 | }
|
| 80 | + } |
| 81 | + /// <summary> |
| 82 | + /// Lists deleted accounts under the subscription. |
| 83 | + /// </summary> |
| 84 | + /// <param name='operations'> |
| 85 | + /// The operations group for this extension method. |
| 86 | + /// </param> |
| 87 | + /// <param name='nextPageLink'> |
| 88 | + /// The NextLink from the previous successful call to List operation. |
| 89 | + /// </param> |
| 90 | + public static Microsoft.Rest.Azure.IPage<DeletedAccount> ListNext(this IDeletedAccountsOperations operations, string nextPageLink) |
| 91 | + { |
| 92 | + return ((IDeletedAccountsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 93 | + } |
91 | 94 |
|
92 |
| - /// <summary> |
93 |
| - /// Lists deleted accounts under the subscription. |
94 |
| - /// </summary> |
95 |
| - /// <param name='operations'> |
96 |
| - /// The operations group for this extension method. |
97 |
| - /// </param> |
98 |
| - /// <param name='nextPageLink'> |
99 |
| - /// The NextLink from the previous successful call to List operation. |
100 |
| - /// </param> |
101 |
| - public static IPage<DeletedAccount> ListNext(this IDeletedAccountsOperations operations, string nextPageLink) |
| 95 | + /// <summary> |
| 96 | + /// Lists deleted accounts under the subscription. |
| 97 | + /// </summary> |
| 98 | + /// <param name='operations'> |
| 99 | + /// The operations group for this extension method. |
| 100 | + /// </param> |
| 101 | + /// <param name='nextPageLink'> |
| 102 | + /// The NextLink from the previous successful call to List operation. |
| 103 | + /// </param> |
| 104 | + /// <param name='cancellationToken'> |
| 105 | + /// The cancellation token. |
| 106 | + /// </param> |
| 107 | + public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedAccount>> ListNextAsync(this IDeletedAccountsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 108 | + { |
| 109 | + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
102 | 110 | {
|
103 |
| - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 111 | + return _result.Body; |
104 | 112 | }
|
105 |
| - |
106 |
| - /// <summary> |
107 |
| - /// Lists deleted accounts under the subscription. |
108 |
| - /// </summary> |
109 |
| - /// <param name='operations'> |
110 |
| - /// The operations group for this extension method. |
111 |
| - /// </param> |
112 |
| - /// <param name='nextPageLink'> |
113 |
| - /// The NextLink from the previous successful call to List operation. |
114 |
| - /// </param> |
115 |
| - /// <param name='cancellationToken'> |
116 |
| - /// The cancellation token. |
117 |
| - /// </param> |
118 |
| - public static async Task<IPage<DeletedAccount>> ListNextAsync(this IDeletedAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) |
119 |
| - { |
120 |
| - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
121 |
| - { |
122 |
| - return _result.Body; |
123 |
| - } |
124 |
| - } |
125 |
| - |
| 113 | + } |
126 | 114 | }
|
127 | 115 | }
|
0 commit comments