Skip to content

Commit

Permalink
Support for asynchronous autopagination (#1947)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe authored and remi-stripe committed Apr 16, 2020
1 parent 4ff93af commit 3d9dafe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Stripe.net/Services/_base/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Stripe
#endif
using System.Threading;
using System.Threading.Tasks;
using Stripe.Infrastructure;

/// <summary>Abstract base class for all services.</summary>
/// <typeparam name="TEntityReturned">
Expand Down Expand Up @@ -268,8 +267,8 @@ protected TEntityReturned CreateEntity(BaseOptions options, RequestOptions reque
RequestOptions requestOptions)
where T : IStripeEntity
{
return AsyncUtils.ToEnumerable(
this.ListRequestAutoPagingAsync<T>(url, options, requestOptions));
return this.ListRequestAutoPagingAsync<T>(url, options, requestOptions)
.ToEnumerable();
}

protected async IAsyncEnumerable<T> ListRequestAutoPagingAsync<T>(
Expand Down
11 changes: 11 additions & 0 deletions src/Stripe.net/Stripe.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
<VersionPrefix>35.17.0</VersionPrefix>
<Version>35.17.0</Version>
<LangVersion>8</LangVersion>
<VersionPrefix>35.10.0</VersionPrefix>
<Version>35.10.0</Version>
<VersionPrefix>35.7.0</VersionPrefix>
<Version>35.7.0</Version>
<VersionPrefix>35.6.0</VersionPrefix>
<Version>35.6.0</Version>
<LangVersion>8</LangVersion>
<VersionPrefix>35.3.0</VersionPrefix>
<Version>35.3.0</Version>
<Authors>Stripe, Jayme Davis</Authors>
<TargetFrameworks>netstandard2.0;net461;net45</TargetFrameworks>
<AssemblyName>Stripe.net</AssemblyName>
Expand Down Expand Up @@ -42,11 +51,13 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Include="System.Linq.Async" Version="4.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.Linq.Async" Version="4.0.0" />
<Reference Include="System.Configuration" />
<Reference Include="System.Net.Http" />
</ItemGroup>
Expand Down

0 comments on commit 3d9dafe

Please sign in to comment.