-
Notifications
You must be signed in to change notification settings - Fork 4k
Fixed a bug to continue visting NextPageLink when listing key vaults from ARM API #17618
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
Conversation
4c5f033
to
d06f4df
Compare
d06f4df
to
8cdd3f7
Compare
/azp run azure-powershell - powershell-core |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run azure-powershell - windows-powershell |
Azure Pipelines successfully started running 1 pipeline(s). |
8cdd3f7
to
5d1cbc8
Compare
@@ -18,7 +18,8 @@ | |||
- Additional information about change #1 | |||
--> | |||
## Upcoming Release | |||
|
|||
* Fixed a bug to continue visting `NextPageLink` when listing key vaults from ARM API |
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.
bug id
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.
No bug id, this issue is reported by email
{ | ||
IResourceManagementClient armClient = ResourceClient; | ||
|
||
return new GenericPageEnumerable<GenericResource>(() => armClient.Resources.List(filter), armClient.Resources.ListNext, first, skip).Select(r => new PSKeyVaultIdentityItem(r)); | ||
var response = armClient.Resources.List(filter); |
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.
Refactor to avoid duplicated 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.
Introduce a new method
ListPagable(Func<type of response> getFirstPage, Func<string, type of response> getNextPage)
Then you can simplify these two methods to call ListPagable
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.
Refactored without delegate function as the signature of Resources.List(filter) and ResourceGroup.ListResources(resourcegroupName, filter) is different.
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added