Skip to content

Commit

Permalink
update framework version
Browse files Browse the repository at this point in the history
  • Loading branch information
ntruchsess committed Sep 17, 2024
1 parent 093d197 commit 90d8a82
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public async Task<CompanyUsersBpnDetails> AddOwnCompanyUsersBusinessPartnerNumbe
var iamUserId = await provisioningManager.GetUserByUserName(userId.ToString()).ConfigureAwait(ConfigureAwaitOptions.None) ??
throw new ConflictException($"user {userId} not found in keycloak");

var (successfulBpns, unsuccessfulBpns) = await businessPartnerNumbers.AggregateAsync(
var (successfulBpns, unsuccessfulBpns) = await businessPartnerNumbers.AggregateAwait(
(SuccessfulBpns: ImmutableList.CreateBuilder<string>(), UnsuccessfulBpns: ImmutableList.CreateBuilder<UnsuccessfulBpns>()),
async (acc, bpn) =>
{
Expand Down
28 changes: 14 additions & 14 deletions src/framework/Framework.Async/AsyncAggregateExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,43 @@ namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Async;

public static class AsyncAggregateExtensions
{
public static Task<TAccumulate> AggregateAsync<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, CancellationToken cancellationToken = default)
public static Task<TAccumulate> AggregateAwait<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, CancellationToken cancellationToken = default)
{
using var enumerator = source.GetEnumerator();
return AggregateAsync(enumerator, seed, accumulate, cancellationToken);
return AggregateAwait(enumerator, seed, accumulate, cancellationToken);
}

public static Task<TAccumulate> AggregateAsync<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, CancellationToken cancellationToken = default)
public static Task<TAccumulate> AggregateAwait<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, CancellationToken cancellationToken = default)
{
using var enumerator = source.GetEnumerator();
return AggregateAsync(enumerator, seed, accumulate, cancellationToken);
return AggregateAwait(enumerator, seed, accumulate, cancellationToken);
}

public static async Task<TResult> AggregateAsync<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, Func<TAccumulate, TResult> result, CancellationToken cancellationToken = default) =>
result(await AggregateAsync(source, seed, accumulate, cancellationToken));
public static async Task<TResult> AggregateAwait<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, Func<TAccumulate, TResult> result, CancellationToken cancellationToken = default) =>
result(await AggregateAwait(source, seed, accumulate, cancellationToken));

public static async Task<TResult> AggregateAsync<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, Func<TAccumulate, TResult> result, CancellationToken cancellationToken = default) =>
result(await AggregateAsync(source, seed, accumulate, cancellationToken));
public static async Task<TResult> AggregateAwait<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, Func<TAccumulate, TResult> result, CancellationToken cancellationToken = default) =>
result(await AggregateAwait(source, seed, accumulate, cancellationToken));

public static Task<TSource> AggregateAsync<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, CancellationToken, Task<TSource>> accumulate, CancellationToken cancellationToken = default)
public static Task<TSource> AggregateAwait<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, CancellationToken, Task<TSource>> accumulate, CancellationToken cancellationToken = default)
{
using var enumerator = source.GetEnumerator();
if (!enumerator.MoveNext())
throw new InvalidOperationException("source must not be empty");

return AggregateAsync(enumerator, enumerator.Current, accumulate, cancellationToken);
return AggregateAwait(enumerator, enumerator.Current, accumulate, cancellationToken);
}

public static Task<TSource> AggregateAsync<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, Task<TSource>> accumulate, CancellationToken cancellationToken = default)
public static Task<TSource> AggregateAwait<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, Task<TSource>> accumulate, CancellationToken cancellationToken = default)
{
using var enumerator = source.GetEnumerator();
if (!enumerator.MoveNext())
throw new InvalidOperationException("source must not be empty");

return AggregateAsync(enumerator, enumerator.Current, accumulate, cancellationToken);
return AggregateAwait(enumerator, enumerator.Current, accumulate, cancellationToken);
}

private static async Task<TAccumulate> AggregateAsync<TSource, TAccumulate>(IEnumerator<TSource> enumerator, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, CancellationToken cancellationToken)
private static async Task<TAccumulate> AggregateAwait<TSource, TAccumulate>(IEnumerator<TSource> enumerator, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, Task<TAccumulate>> accumulate, CancellationToken cancellationToken)
{
var accumulator = seed;
while (enumerator.MoveNext())
Expand All @@ -68,7 +68,7 @@ private static async Task<TAccumulate> AggregateAsync<TSource, TAccumulate>(IEnu
return accumulator;
}

private static async Task<TAccumulate> AggregateAsync<TSource, TAccumulate>(IEnumerator<TSource> enumerator, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, CancellationToken cancellationToken)
private static async Task<TAccumulate> AggregateAwait<TSource, TAccumulate>(IEnumerator<TSource> enumerator, TAccumulate seed, Func<TAccumulate, TSource, Task<TAccumulate>> accumulate, CancellationToken cancellationToken)
{
var accumulator = seed;
while (enumerator.MoveNext())
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Framework.Async/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Cors/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.DBAccess/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.IO/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Linq/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Logging/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Models/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Seeding/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Swagger/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Token/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Web/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.8.0</VersionPrefix>
<VersionPrefix>2.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class SeedDataHandler : ISeedDataHandler
public async Task Import(KeycloakRealmSettings realmSettings, CancellationToken cancellationToken)
{
_keycloakRealm = (await realmSettings.DataPathes
.AggregateAsync(
.AggregateAwait(
new KeycloakRealm(),
async (importRealm, path) => importRealm.Merge(await ReadJsonRealm(path, realmSettings.Realm, cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None)),
cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None))
Expand Down

0 comments on commit 90d8a82

Please sign in to comment.