-
Notifications
You must be signed in to change notification settings - Fork 4k
add pagination support #4111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pagination support #4111
Conversation
|
||
var nextPageLink = this.AddResourceToListAndReturnNextPageLink(resourcePage, resourceList); | ||
|
||
while (!string.IsNullOrEmpty(nextPageLink)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be simpler to create a generic enumerator over IPage that returned an IEnumerable? You can find a sample of this code here: 9just needs to be made generic):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl please take a look at the changes. i have removed the redundant code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@markcowl could you please take another look |
Waiting on common code implementation for SupportsPaging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeepakRajendranMsft LGTM
Does this PR contain all of the cmdlets that would need to use this new mechanism? Also, any additional test coverage needed for these changes?
@cormacpayne, As mentioned above, the problem was that to test it, we would require to create a lot of resources. and yes we have all the cmdlets that would use this. i tested this manually against our test clusters |
Mark is OOF, approved offline with Scott
Description
Changes contain:
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines