Skip to content

Commit 926b99c

Browse files
Migrate Reservations from generation to main (Azure#21196)
* Move Reservations to main * Update Changelog.md --------- Co-authored-by: Yabo Hu <yabhu@microsoft.com>
1 parent 88e08e0 commit 926b99c

File tree

11 files changed

+112
-177
lines changed

11 files changed

+112
-177
lines changed

src/Reservations/Az.Reservations.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 3/13/2023
6+
# Generated on: 3/14/2023
77
#
88

99
@{

src/Reservations/Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
-->
2020
## Upcoming Release
2121
* Added cmdlet `Invoke-AzReservationReturn`
22+
* Removed parameters `RefreshSummary`, `Skiptoken`, `Take` from cmdlet `Get-AzReservation`
23+
* Added parameters `First`, `Skip` for cmdlet `Get-AzReservation`
2224

2325
## Version 0.11.0
2426
* Added new commands to CalculateRefund and Return reservation

src/Reservations/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ directive:
204204
subject-prefix: Reservation
205205
subject: Return
206206
hide: true
207+
208+
### Hide command parameter
209+
- where:
210+
verb: Get
211+
subject: Reservation
212+
parameter-name: Skiptoken|Take|RefreshSummary
213+
hide: true
207214

208215
### Rename property name
209216
- where:
@@ -434,6 +441,12 @@ directive:
434441
model-name: RefundResponse
435442
set:
436443
suppress-format: true
444+
445+
- where:
446+
verb: Get
447+
variant: ^List1(.*)
448+
set:
449+
clientside-pagination: true
437450

438451
- no-inline:
439452
- Price

src/Reservations/Reservations.sln

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{1177B5F0-C049-4A3F-A470-3670889E8450}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{14B788BB-1062-41A3-B03C-AF1B2DF2D961}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{6AD85668-D55E-4756-817C-6A2F2126741F}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{152F59C4-3EFA-4C9F-89CF-9B09CE32AD40}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{C19E6B79-6484-4A73-B1DF-26699372E87A}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{43D81BEF-08CD-484D-916C-8CCB74DCEAD3}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{259997FB-AB09-499F-AE7C-7A052F8600EF}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{0B9A8D52-FBB5-4F46-BCC6-A2DDFE9ECBE5}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{2B01E114-6EC5-4A14-90D1-50A4ADA431EC}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{65B22626-3659-48F4-88F3-AC04DD59A2BA}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{7CDBCF71-514C-456C-9522-0788F74D806E}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{AF527A31-6CD5-4AFF-B55B-88CF539E08A0}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "Az.Reservations.csproj", "{52BEE358-2F42-4573-8DB7-3F12D9E5C8FC}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "Az.Reservations.csproj", "{CF21494E-914E-4B33-A201-C148F5220349}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,33 +26,33 @@ Global
2626
HideSolutionNode = FALSE
2727
EndGlobalSection
2828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
29-
{1177B5F0-C049-4A3F-A470-3670889E8450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{1177B5F0-C049-4A3F-A470-3670889E8450}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{1177B5F0-C049-4A3F-A470-3670889E8450}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{1177B5F0-C049-4A3F-A470-3670889E8450}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{6AD85668-D55E-4756-817C-6A2F2126741F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{6AD85668-D55E-4756-817C-6A2F2126741F}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{6AD85668-D55E-4756-817C-6A2F2126741F}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{6AD85668-D55E-4756-817C-6A2F2126741F}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{C19E6B79-6484-4A73-B1DF-26699372E87A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38-
{C19E6B79-6484-4A73-B1DF-26699372E87A}.Debug|Any CPU.Build.0 = Debug|Any CPU
39-
{C19E6B79-6484-4A73-B1DF-26699372E87A}.Release|Any CPU.ActiveCfg = Release|Any CPU
40-
{C19E6B79-6484-4A73-B1DF-26699372E87A}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{259997FB-AB09-499F-AE7C-7A052F8600EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{259997FB-AB09-499F-AE7C-7A052F8600EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{259997FB-AB09-499F-AE7C-7A052F8600EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
44-
{259997FB-AB09-499F-AE7C-7A052F8600EF}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{2B01E114-6EC5-4A14-90D1-50A4ADA431EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{2B01E114-6EC5-4A14-90D1-50A4ADA431EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{2B01E114-6EC5-4A14-90D1-50A4ADA431EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{2B01E114-6EC5-4A14-90D1-50A4ADA431EC}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{7CDBCF71-514C-456C-9522-0788F74D806E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{7CDBCF71-514C-456C-9522-0788F74D806E}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{7CDBCF71-514C-456C-9522-0788F74D806E}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{7CDBCF71-514C-456C-9522-0788F74D806E}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{52BEE358-2F42-4573-8DB7-3F12D9E5C8FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{52BEE358-2F42-4573-8DB7-3F12D9E5C8FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{52BEE358-2F42-4573-8DB7-3F12D9E5C8FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{52BEE358-2F42-4573-8DB7-3F12D9E5C8FC}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{14B788BB-1062-41A3-B03C-AF1B2DF2D961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{14B788BB-1062-41A3-B03C-AF1B2DF2D961}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{14B788BB-1062-41A3-B03C-AF1B2DF2D961}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{14B788BB-1062-41A3-B03C-AF1B2DF2D961}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{152F59C4-3EFA-4C9F-89CF-9B09CE32AD40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{152F59C4-3EFA-4C9F-89CF-9B09CE32AD40}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{152F59C4-3EFA-4C9F-89CF-9B09CE32AD40}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{152F59C4-3EFA-4C9F-89CF-9B09CE32AD40}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{43D81BEF-08CD-484D-916C-8CCB74DCEAD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{43D81BEF-08CD-484D-916C-8CCB74DCEAD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{43D81BEF-08CD-484D-916C-8CCB74DCEAD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{43D81BEF-08CD-484D-916C-8CCB74DCEAD3}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{0B9A8D52-FBB5-4F46-BCC6-A2DDFE9ECBE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{0B9A8D52-FBB5-4F46-BCC6-A2DDFE9ECBE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{0B9A8D52-FBB5-4F46-BCC6-A2DDFE9ECBE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{0B9A8D52-FBB5-4F46-BCC6-A2DDFE9ECBE5}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{65B22626-3659-48F4-88F3-AC04DD59A2BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{65B22626-3659-48F4-88F3-AC04DD59A2BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{65B22626-3659-48F4-88F3-AC04DD59A2BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{65B22626-3659-48F4-88F3-AC04DD59A2BA}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{AF527A31-6CD5-4AFF-B55B-88CF539E08A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{AF527A31-6CD5-4AFF-B55B-88CF539E08A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{AF527A31-6CD5-4AFF-B55B-88CF539E08A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{AF527A31-6CD5-4AFF-B55B-88CF539E08A0}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{CF21494E-914E-4B33-A201-C148F5220349}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{CF21494E-914E-4B33-A201-C148F5220349}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{CF21494E-914E-4B33-A201-C148F5220349}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{CF21494E-914E-4B33-A201-C148F5220349}.Release|Any CPU.Build.0 = Release|Any CPU
5757
EndGlobalSection
5858
EndGlobal

src/Reservations/examples/Invoke-AzReservationReturn.md

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,8 @@ Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -ReservationToR
88
```
99

1010
```output
11-
BillingInformationBillingCurrencyProratedAmount : {
12-
"currencyCode": "USD",
13-
"amount": 12.9
14-
}
15-
BillingInformationBillingCurrencyRemainingCommitmentAmount : {
16-
"currencyCode": "USD",
17-
"amount": 18.06
18-
}
19-
BillingInformationBillingCurrencyTotalPaidAmount : {
20-
"currencyCode": "USD",
21-
"amount": 15.48
22-
}
23-
BillingInformationBillingPlan : Monthly
24-
BillingInformationCompletedTransaction : 5
25-
BillingInformationTotalTransaction : 12
26-
BillingRefundAmount : {
27-
"currencyCode": "USD",
28-
"amount": 2.58
29-
}
30-
ConsumedRefundsTotal : {
31-
"currencyCode": "USD",
32-
"amount": 368.23
33-
}
34-
Id : /providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003
35-
Location :
36-
MaxRefundLimit : {
37-
"currencyCode": "USD",
38-
"amount": 50000
39-
}
40-
PolicyError : {}
41-
PricingRefundAmount : {
42-
"currencyCode": "USD",
43-
"amount": 2.58
44-
}
45-
Quantity : 1
46-
ResourceGroupName :
47-
SessionId : 93fe5df2-d888-47c5-b00c-cd0ccb1f29b9
11+
ReservationOrderId DisplayName Term State Quantity Reservations
12+
------------------ ----------- ---- ----- -------- ------------
13+
179ef21b-90ec-4fe4-9423-f794b856dfee VM_RI_08-20-2021_15-47 P3Y Succeeded 1 {{…
4814
```
4915
Proceed reservations return with session ID obtained from Invoke-AzReservationCalculateRefund.

src/Reservations/exports/Get-AzReservation.ps1

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,29 +89,23 @@ param(
8989
# May be used to sort order by reservation properties.
9090
${Orderby},
9191

92-
[Parameter(ParameterSetName='List1')]
93-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
94-
[System.String]
95-
# To indicate whether to refresh the roll up counts of the reservations group by provisioning states
96-
${RefreshSummary},
97-
9892
[Parameter(ParameterSetName='List1')]
9993
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
10094
[System.String]
10195
# The selected provisioning state
10296
${SelectedState},
10397

10498
[Parameter(ParameterSetName='List1')]
105-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
106-
[System.Single]
107-
# The number of reservations to skip from the list before returning results
108-
${Skiptoken},
99+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
100+
[System.UInt64]
101+
# Gets only the first 'n' objects.
102+
${First},
109103

110104
[Parameter(ParameterSetName='List1')]
111-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
112-
[System.Single]
113-
# To number of reservations to return
114-
${Take},
105+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
106+
[System.UInt64]
107+
# Ignores the first 'n' objects and then gets the remaining objects.
108+
${Skip},
115109

116110
[Parameter()]
117111
[Alias('AzureRMContext', 'AzureCredential')]

src/Reservations/exports/ProxyCmdletDefinitions.ps1

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,29 +1315,23 @@ param(
13151315
# May be used to sort order by reservation properties.
13161316
${Orderby},
13171317

1318-
[Parameter(ParameterSetName='List1')]
1319-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
1320-
[System.String]
1321-
# To indicate whether to refresh the roll up counts of the reservations group by provisioning states
1322-
${RefreshSummary},
1323-
13241318
[Parameter(ParameterSetName='List1')]
13251319
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
13261320
[System.String]
13271321
# The selected provisioning state
13281322
${SelectedState},
13291323

13301324
[Parameter(ParameterSetName='List1')]
1331-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
1332-
[System.Single]
1333-
# The number of reservations to skip from the list before returning results
1334-
${Skiptoken},
1325+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
1326+
[System.UInt64]
1327+
# Gets only the first 'n' objects.
1328+
${First},
13351329

13361330
[Parameter(ParameterSetName='List1')]
1337-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
1338-
[System.Single]
1339-
# To number of reservations to return
1340-
${Take},
1331+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
1332+
[System.UInt64]
1333+
# Ignores the first 'n' objects and then gets the remaining objects.
1334+
${Skip},
13411335

13421336
[Parameter()]
13431337
[Alias('AzureRMContext', 'AzureCredential')]

src/Reservations/generate-info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"swagger_commit": "ba9f30eed00b61ebb1ceedecd65a8ce82c81609b",
2+
"swagger_commit": "d4dfb3388ab40185cf302512268ad1406f666d64",
33
"node": "v14.15.5",
44
"autorest": "`-- (empty)",
55
"autorest_core": "3.9.4",

src/Reservations/generated/cmdlets/GetAzReservation_List1.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Reservations.Cmdlets
1515
/// <remarks>
1616
/// [OpenAPI] ListAll=>GET:"/providers/Microsoft.Capacity/reservations"
1717
/// </remarks>
18-
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzReservation_List1")]
18+
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzReservation_List1", SupportsPaging = true)]
1919
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse))]
2020
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.Description(@"List the reservations and the roll up counts of reservations group by provisioning states that the user has access to in the current tenant.")]
2121
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.Generated]
@@ -150,6 +150,7 @@ public partial class GetAzReservation_List1 : global::System.Management.Automati
150150
Description = @"To indicate whether to refresh the roll up counts of the reservations group by provisioning states",
151151
SerializedName = @"refreshSummary",
152152
PossibleTypes = new [] { typeof(string) })]
153+
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.DoNotExport]
153154
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.ParameterCategory.Query)]
154155
public string RefreshSummary { get => this._refreshSummary; set => this._refreshSummary = value; }
155156

@@ -178,6 +179,7 @@ public partial class GetAzReservation_List1 : global::System.Management.Automati
178179
Description = @"The number of reservations to skip from the list before returning results",
179180
SerializedName = @"$skiptoken",
180181
PossibleTypes = new [] { typeof(float) })]
182+
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.DoNotExport]
181183
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.ParameterCategory.Query)]
182184
public float Skiptoken { get => this._skiptoken; set => this._skiptoken = value; }
183185

@@ -192,6 +194,7 @@ public partial class GetAzReservation_List1 : global::System.Management.Automati
192194
Description = @"To number of reservations to return",
193195
SerializedName = @"take",
194196
PossibleTypes = new [] { typeof(float) })]
197+
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.DoNotExport]
195198
[global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Reservations.ParameterCategory.Query)]
196199
public float Take { get => this._take; set => this._take = value; }
197200

@@ -447,15 +450,27 @@ protected override void StopProcessing()
447450
return ;
448451
}
449452
// onOk - response for 200 / application/json
453+
// clientside pagination enabled
450454
// response should be returning an array of some kind. +Pageable
451455
// pageable / value / nextLink
452456
var result = await response;
453-
WriteObject(result.Value,true);
457+
if ((ulong)result.Value.Length <= this.PagingParameters.Skip)
458+
{
459+
this.PagingParameters.Skip = this.PagingParameters.Skip - (ulong)result.Value.Length;
460+
}
461+
else
462+
{
463+
ulong toRead = Math.Min(this.PagingParameters.First, (ulong)result.Value.Length - this.PagingParameters.Skip);
464+
var requiredResult = result.Value.SubArray((int)this.PagingParameters.Skip, (int)toRead);
465+
WriteObject(requiredResult, true);
466+
this.PagingParameters.Skip = 0;
467+
this.PagingParameters.First = this.PagingParameters.First <= toRead ? 0 : this.PagingParameters.First - toRead;
468+
}
454469
_nextLink = result.NextLink;
455470
if (_isFirst)
456471
{
457472
_isFirst = false;
458-
while (_nextLink != null)
473+
while (_nextLink != null && this.PagingParameters.First > 0)
459474
{
460475
if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage )
461476
{

0 commit comments

Comments
 (0)