Skip to content

Commit a2290ab

Browse files
authored
Merge pull request #403 from MangoInstantMessenger/packages-bump
Packages bump
2 parents de05318 + 076b90a commit a2290ab

11 files changed

Lines changed: 63 additions & 63 deletions

File tree

MangoAPI.Application/MangoAPI.Application.csproj

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj" />
12+
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj"/>
1313
</ItemGroup>
14-
15-
<ItemGroup>
16-
<PackageReference Include="Azure.Storage.Blobs" Version="12.14.1" />
17-
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
18-
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
19-
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.25.0" />
20-
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.25.0" />
21-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
22-
</ItemGroup>
23-
2414
</Project>

MangoAPI.Application/Services/AvatarService.cs

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,31 @@ namespace MangoAPI.Application.Services;
66

77
public class AvatarService : IAvatarService
88
{
9-
private readonly List<string> avatars = new() { "animetyanpic1.jpg", "animetyanpic2.jpg", "animetyanpic3.jpg",
10-
"animetyanpic4.jpg", "animetyanpic5.jpg", "animetyanpic6.jpg", "animetyanpic7.jpg", "animetyanpic8.jpg",
11-
"animetyanpic9.jpg", "animetyanpic10.jpg", "animetyanpic11.jpg", "animetyanpic12.jpg", "animetyanpic13.jpg",
12-
"animetyanpic14.jpg", "animetyanpic15.jpg", "animetyanpic16.jpg", "animetyanpic17.jpg"
13-
};
14-
9+
private readonly List<string> avatars = new()
10+
{
11+
"animetyanpic1.jpg",
12+
"animetyanpic2.jpg",
13+
"animetyanpic3.jpg",
14+
"animetyanpic4.jpg",
15+
"animetyanpic5.jpg",
16+
"animetyanpic6.jpg",
17+
"animetyanpic7.jpg",
18+
"animetyanpic8.jpg",
19+
"animetyanpic9.jpg",
20+
"animetyanpic10.jpg",
21+
"animetyanpic11.jpg",
22+
"animetyanpic12.jpg",
23+
"animetyanpic13.jpg",
24+
"animetyanpic14.jpg",
25+
"animetyanpic15.jpg",
26+
"animetyanpic16.jpg",
27+
"animetyanpic17.jpg"
28+
};
29+
1530
public string GetRandomAvatar()
1631
{
17-
var avatarFileName = avatars[new Random().Next(0, avatars.Count - 1)];
32+
var upperBound = avatars.Count - 1;
33+
var avatarFileName = avatars[new Random().Next(upperBound)];
1834

1935
return avatarFileName;
2036
}

MangoAPI.BusinessLogic/Configuration/MangoStartup.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ public static void Initialize(
4242
mangoRefreshTokenLifetimeDays);
4343

4444
services.AddSingInManagerServices();
45-
45+
4646
services.AddSignalR();
47-
47+
4848
services.AddSingleton<IVersionService, VersionService>();
4949

5050
services.AddSingleton<IMangoUserSettings, MangoUserSettings>(_ => new MangoUserSettings(mangoUserPassword));
5151

5252
services.AddScoped<IAvatarService, AvatarService>();
53-
53+
5454
services.AddValidatorsFromAssembly(typeof(LoginCommandValidator).Assembly);
55-
55+
5656
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>));
57-
57+
5858
services.AddTransient(typeof(ResponseFactory<>));
59-
60-
services.AddMediatR(typeof(RegisterCommandHandler).Assembly);
61-
59+
60+
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(RegisterCommandHandler).Assembly));
61+
6262
services.AddScoped<PasswordHashService>();
63-
63+
6464
services.AddIdentityUsers();
6565

6666
services.AddSignalR();
@@ -75,8 +75,8 @@ public static void Initialize(
7575
services.AddLogging();
7676

7777
services.AddHttpClient();
78-
78+
7979
var provider = services.BuildServiceProvider();
8080
MangoCompositionRoot.SetProvider(provider);
8181
}
82-
}
82+
}

MangoAPI.BusinessLogic/MangoAPI.BusinessLogic.csproj

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<ProjectReference Include="..\MangoAPI.Application\MangoAPI.Application.csproj" />
13-
<ProjectReference Include="..\MangoAPI.Infrastructure\MangoAPI.Infrastructure.csproj" />
14-
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj" />
15-
</ItemGroup>
16-
17-
<ItemGroup>
18-
<PackageReference Include="Azure.Storage.Blobs" Version="12.14.1" />
19-
<PackageReference Include="FluentValidation" Version="11.2.2" />
20-
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.2" />
21-
<PackageReference Include="MediatR" Version="11.0.0" />
22-
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
23-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.10" />
24-
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
25-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
26-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
27-
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.4.0" />
28-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.4.0" />
29-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.4.0" />
12+
<ProjectReference Include="..\MangoAPI.Application\MangoAPI.Application.csproj"/>
13+
<ProjectReference Include="..\MangoAPI.Infrastructure\MangoAPI.Infrastructure.csproj"/>
14+
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj"/>
3015
</ItemGroup>
3116
</Project>

MangoAPI.DiffieHellmanLibrary/MangoAPI.DiffieHellmanLibrary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="CliWrap" Version="3.5.0" />
22+
<PackageReference Include="CliWrap" Version="3.6.0" />
2323
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
2424
</ItemGroup>
2525

MangoAPI.Domain/MangoAPI.Domain.csproj

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,22 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1">
13-
<PrivateAssets>all</PrivateAssets>
14-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13+
<PrivateAssets>all</PrivateAssets>
14+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1515
</PackageReference>
16-
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.10" />
16+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.14"/>
17+
<PackageReference Include="Azure.Storage.Blobs" Version="12.15.0"/>
18+
<PackageReference Include="FluentValidation" Version="11.5.1"/>
19+
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.5.1"/>
20+
<PackageReference Include="MediatR" Version="12.0.1"/>
21+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.14"/>
22+
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0"/>
23+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0"/>
24+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0"/>
25+
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0"/>
26+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0"/>
27+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0"/>
28+
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0"/>
29+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.27.0"/>
1730
</ItemGroup>
18-
1931
</Project>

MangoAPI.Infrastructure/MangoAPI.Infrastructure.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.10" />
18-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.10">
17+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
18+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.14">
1919
<PrivateAssets>all</PrivateAssets>
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
</PackageReference>
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.10" />
23-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.10">
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
23+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
2424
<PrivateAssets>all</PrivateAssets>
2525
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2626
</PackageReference>
27-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
2827
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
2928
</ItemGroup>
3029

MangoAPI.IntegrationTests/MangoAPI.IntegrationTests.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
26-
<PackageReference Include="FluentAssertions" Version="6.8.0" />
27-
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="6.0.10" />
28-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
26+
<PackageReference Include="FluentAssertions" Version="6.10.0" />
27+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
2928
<PackageReference Include="Respawn" Version="6.0.0" />
3029
<PackageReference Include="xunit" Version="2.4.2" />
3130
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">

MangoAPI.Presentation/MangoAPI.Presentation.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
2626
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
2727
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.10" />
28-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
2928
</ItemGroup>
3029

3130
<ItemGroup>

MangoAPI.Presentation/Startup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using Microsoft.Extensions.Configuration;
1919
using Microsoft.Extensions.DependencyInjection;
2020
using Microsoft.Extensions.Hosting;
21-
using Microsoft.OpenApi.Models;
2221

2322
namespace MangoAPI.Presentation;
2423

@@ -143,7 +142,7 @@ public void ConfigureServices(IServiceCollection services)
143142

144143
services.AddTransient(typeof(ResponseFactory<>));
145144

146-
services.AddMediatR(typeof(RegisterCommandHandler).Assembly);
145+
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(RegisterCommandHandler).Assembly));
147146

148147
services.AddScoped<PasswordHashService>();
149148

0 commit comments

Comments
 (0)