Skip to content

Commit

Permalink
chore: use replacement for IdentityModel's IsNullOrEmpty extension me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
tnotheis committed Aug 27, 2024
1 parent cdc259a commit c5963db
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,41 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="ReHackt.Extensions.Options.Validation" Version="8.0.2" />
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
<PackageReference Include="Serilog.Exceptions.EntityFrameworkCore" Version="8.4.0" />
<PackageReference Include="Serilog.Enrichers.Demystifier" Version="1.0.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0"/>
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0"/>
<PackageReference Include="ReHackt.Extensions.Options.Validation" Version="8.0.2"/>
<PackageReference Include="Serilog.Exceptions" Version="8.4.0"/>
<PackageReference Include="Serilog.Exceptions.EntityFrameworkCore" Version="8.4.0"/>
<PackageReference Include="Serilog.Enrichers.Demystifier" Version="1.0.2"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.API\BuildingBlocks.API.csproj" />
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.Application\BuildingBlocks.Application.csproj" />
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.Infrastructure\BuildingBlocks.Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\Infrastructure\Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.Application\Challenges.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.ConsumerApi\Challenges.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Files\src\Files.Application\Files.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Files\src\Files.ConsumerApi\Files.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Messages\src\Messages.Application\Messages.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Messages\src\Messages.ConsumerApi\Messages.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Quotas\src\Quotas.Application\Quotas.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Quotas\src\Quotas.ConsumerApi\Quotas.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Relationships\src\Relationships.Application\Relationships.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Relationships\src\Relationships.ConsumerApi\Relationships.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Synchronization\src\Synchronization.Application\Synchronization.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Synchronization\src\Synchronization.ConsumerApi\Synchronization.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Tokens\src\Tokens.Application\Tokens.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Tokens\src\Tokens.ConsumerApi\Tokens.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.Application\Devices.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.ConsumerApi\Devices.ConsumerApi.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.Infrastructure\Devices.Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.API\BuildingBlocks.API.csproj"/>
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.Application\BuildingBlocks.Application.csproj"/>
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.Infrastructure\BuildingBlocks.Infrastructure.csproj"/>
<ProjectReference Include="..\..\..\..\BuildingBlocks\test\Tooling.Tests\Tooling.Tests.csproj"/>
<ProjectReference Include="..\..\..\..\Infrastructure\Infrastructure.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.Application\Challenges.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.ConsumerApi\Challenges.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Files\src\Files.Application\Files.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Files\src\Files.ConsumerApi\Files.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Messages\src\Messages.Application\Messages.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Messages\src\Messages.ConsumerApi\Messages.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Quotas\src\Quotas.Application\Quotas.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Quotas\src\Quotas.ConsumerApi\Quotas.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Relationships\src\Relationships.Application\Relationships.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Relationships\src\Relationships.ConsumerApi\Relationships.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Synchronization\src\Synchronization.Application\Synchronization.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Synchronization\src\Synchronization.ConsumerApi\Synchronization.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Tokens\src\Tokens.Application\Tokens.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Tokens\src\Tokens.ConsumerApi\Tokens.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.Application\Devices.Application.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.ConsumerApi\Devices.ConsumerApi.csproj"/>
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.Infrastructure\Devices.Infrastructure.csproj"/>
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="Build" Condition="$(Configuration) == Debug">
<Delete Files="$(ProjectDir)appsettings.override.json" />
<Copy SourceFiles="..\..\..\..\appsettings.override.json" DestinationFolder="$(ProjectDir)" UseHardlinksIfPossible="true" />
<Delete Files="$(ProjectDir)appsettings.override.json"/>
<Copy SourceFiles="..\..\..\..\appsettings.override.json" DestinationFolder="$(ProjectDir)" UseHardlinksIfPossible="true"/>
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Backbone.Modules.Devices.Application.Identities.Commands.CancelStaleIdentityDeletionProcesses;
using Backbone.Tooling.Extensions;
using MediatR;
using Microsoft.IdentityModel.Tokens;

namespace Backbone.Job.IdentityDeletion.Workers;

Expand Down Expand Up @@ -35,7 +35,7 @@ private async Task StartProcessing(CancellationToken cancellationToken)
{
var identityDeletionProcessIds = await _mediator.Send(new CancelStaleIdentityDeletionProcessesCommand(), cancellationToken);

if (!identityDeletionProcessIds.IsNullOrEmpty())
if (!identityDeletionProcessIds.IsEmpty())
{
var concatenatedIds = string.Join(", ", identityDeletionProcessIds);
_logger.WorkerCompletedWithResults(concatenatedIds);
Expand Down
5 changes: 5 additions & 0 deletions BuildingBlocks/src/Tooling/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ public static byte[] GetBytes(this string text)
{
return Encoding.UTF8.GetBytes(text);
}

public static bool IsEmpty<T>(this IEnumerable<T> items)
{
return !items.Any();
}
}

0 comments on commit c5963db

Please sign in to comment.