Skip to content
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

Update AutoRest C# version #15026

Merged
1 commit merged into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/CodeGeneration.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6236/autorest-3.0.6236.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6306</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200826.1/autorest-csharp-v3-3.0.0-dev.20200826.1.tgz</_AutoRestCSharpVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200909.1/autorest-csharp-v3-3.0.0-dev.20200909.1.tgz</_AutoRestCSharpVersion>
<_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true</_SupportsCodeGeneration>
<_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md</_DefaultInputName>
<AutoRestInput Condition="'$(AutoRestInput)' == ''">$(_DefaultInputName)</AutoRestInput>
Expand Down Expand Up @@ -59,3 +59,4 @@




16 changes: 14 additions & 2 deletions sdk/core/Azure.Core/src/Shared/AutoRest/PageableHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public FuncAsyncPageable(AsyncPageFunc<T> firstPageFunc, AsyncPageFunc<T>? nextP

public override async IAsyncEnumerable<Page<T>> AsPages(string? continuationToken = default, int? pageSizeHint = default)
{
AsyncPageFunc<T>? pageFunc = _firstPageFunc;
AsyncPageFunc<T>? pageFunc = string.IsNullOrEmpty(continuationToken) ? _firstPageFunc : _nextPageFunc;

if (pageFunc == null)
{
yield break;
}

int? pageSize = pageSizeHint ?? _defaultPageSize;
do
{
Expand All @@ -70,7 +76,13 @@ public FuncPageable(PageFunc<T> firstPageFunc, PageFunc<T>? nextPageFunc, int? d

public override IEnumerable<Page<T>> AsPages(string? continuationToken = default, int? pageSizeHint = default)
{
PageFunc<T>? pageFunc = _firstPageFunc;
PageFunc<T>? pageFunc = string.IsNullOrEmpty(continuationToken) ? _firstPageFunc : _nextPageFunc;

if (pageFunc == null)
{
yield break;
}

int? pageSize = pageSizeHint ?? _defaultPageSize;
do
{
Expand Down