Skip to content

Commit

Permalink
Update AutoRest C# version to https://github.com/Azure/autorest.cshar…
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Sep 9, 2020
1 parent 9705b81 commit ddb8cc1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
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

0 comments on commit ddb8cc1

Please sign in to comment.