Skip to content

Commit 7842df7

Browse files
committed
version 5.8.2
1 parent d1f4750 commit 7842df7

File tree

11 files changed

+32
-27
lines changed

11 files changed

+32
-27
lines changed

examples/BookstoreSimulator/BookstoreSimulator.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Nullable>enable</Nullable>
5+
<Nullable>disable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

@@ -12,6 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
15+
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.3.0" />
1516
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
1617
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
1718
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
@@ -20,6 +21,8 @@
2021
<PackageReference Include="FluentValidation" Version="11.6.0" />
2122
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
2223
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
24+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
25+
<PackageReference Include="System.Text.Json" Version="9.0.0" />
2326
</ItemGroup>
2427

2528
</Project>

examples/BookstoreSimulator/Controllers/DatabasesController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ public DatabasesController(DB db)
1717

1818
[AllowAnonymous]
1919
[HttpPut]
20-
public async Task PreparedDB()
20+
public Task PreparedDB()
2121
{
2222
_db.CleanTables();
2323
_db.CreateTables();
24+
25+
return Task.CompletedTask;
2426
}
2527
}
2628
}

examples/BookstoreSimulator/Controllers/UsersController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class UsersController : ControllerBase
1717
private readonly JwtSetings _jwtSetings;
1818
private readonly SingUpUserRequestValidator _singUpUserRequestValidator;
1919
private readonly LoginUserRequestValidator _loginUserRequestValidator;
20-
20+
2121
public UsersController
2222
(UserRepository rep, JwtSetings jwtSetings,
2323
SingUpUserRequestValidator singUpUserRequestValidator,
@@ -87,9 +87,9 @@ public async Task<IResult> Login([FromBody] LoginUserRequest request)
8787
[Route("logout")]
8888
[Authorize]
8989
[HttpPost]
90-
public async Task<IResult> Logout()
90+
public Task<IResult> Logout()
9191
{
92-
return Results.Ok();
92+
return Task.FromResult(Results.Ok());
9393
}
9494
}
9595
}

examples/BookstoreSimulator/Infra/DAL/UserRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public async Task<DBResultExeption> InsertUser(UserDBRecord record)
9494
}
9595
}
9696

97-
public async Task<UserLoginDBRecord?> TryFindUserLoginData(string email)
97+
public async Task<UserLoginDBRecord> TryFindUserLoginData(string email)
9898
{
9999
try
100100
{

examples/BookstoreSimulator/Pages/Error.cshtml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace BookstoreSimulator.Pages
88
[IgnoreAntiforgeryToken]
99
public class ErrorModel : PageModel
1010
{
11-
public string? RequestId { get; set; }
11+
public string RequestId { get; set; }
1212

13-
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
13+
public bool ShowRequestId => string.IsNullOrEmpty(RequestId);
1414

1515
private readonly ILogger<ErrorModel> _logger;
1616

@@ -24,4 +24,4 @@ public void OnGet()
2424
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
2525
}
2626
}
27-
}
27+
}

examples/BookstoreSimulator/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ public static void Main(string[] args)
8989
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtSetings.Key))
9090
};
9191
});
92-
92+
9393
var settings = builder.Configuration.GetSection("BookstoreSettings").Get<BookstoreSettings>();
9494

9595
builder.Services.AddSingleton(_ => new UserRepository(settings, logger));
96-
builder.Services.AddSingleton(_ => new BookRepository(settings, logger));
96+
builder.Services.AddSingleton(_ => new BookRepository(settings, logger));
9797
builder.Services.AddSingleton(_ => new OrderRepository(settings, logger));
9898
builder.Services.AddSingleton(_ => new DB(settings, logger));
9999
builder.Services.AddSingleton(_ => new SingUpUserRequestValidator());
@@ -115,8 +115,8 @@ public static void Main(string[] args)
115115
{
116116
OnPrepareResponse = context =>
117117
{
118-
context.Context.Response.Headers.Add("Cache-Control", "no-cache, no-store");
119-
context.Context.Response.Headers.Add("Expires", "-1");
118+
context.Context.Response.Headers.Append("Cache-Control", "no-cache, no-store");
119+
context.Context.Response.Headers.Append("Expires", "-1");
120120
}
121121
});
122122

examples/Demo/Demo.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@
6767
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
6868
<PackageReference Include="LiteDB" Version="5.0.15" />
6969

70-
<PackageReference Include="NBomber" Version="5.8.1" />
70+
<PackageReference Include="NBomber" Version="5.8.2" />
7171
<PackageReference Include="NBomber.Data" Version="5.0.0" />
72-
<PackageReference Include="NBomber.Http" Version="5.2.0" />
73-
<PackageReference Include="NBomber.MQTT" Version="0.2.0" />
74-
<PackageReference Include="NBomber.Sinks.Timescale" Version="0.6.1" />
75-
<PackageReference Include="NBomber.WebBrowser" Version="0.1.0" />
72+
<PackageReference Include="NBomber.Http" Version="5.2.1" />
73+
<PackageReference Include="NBomber.MQTT" Version="0.2.1" />
74+
<PackageReference Include="NBomber.Sinks.Timescale" Version="0.6.2" />
75+
<PackageReference Include="NBomber.WebBrowser" Version="0.1.1" />
7676
<PackageReference Include="NBomber.WebSockets" Version="0.1.0" />
77-
<PackageReference Include="NBomber.Sinks.InfluxDB" Version="5.1.0" />
77+
<PackageReference Include="NBomber.Sinks.InfluxDB" Version="5.1.1" />
7878

7979
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.0" />
8080
<PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="8.3.0" />

examples/Demo/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// -------------------------------
3232
// ----- Hello World examples -----
3333
// -------------------------------
34-
new HelloWorldExample().Run();
34+
// new HelloWorldExample().Run();
3535
// new ScenarioWithInit().Run();
3636
// new ScenarioWithSteps().Run();
3737
// new StepsShareData().Run();
@@ -65,7 +65,7 @@
6565
// new InfluxDBReportingExample().Run();
6666
// new TimescaleDBReportingExample().Run();
6767
// new CustomReportingExample().Run();
68-
// new NBomberStudioReportingExample().Run();
68+
new NBomberStudioReportingExample().Run();
6969

7070
// ---- Logs ----
7171
// new TextFileLogger().Run();

examples/WebAppSimulator/Pages/Error.cshtml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace WebAppSimulator.Pages
88
[IgnoreAntiforgeryToken]
99
public class ErrorModel : PageModel
1010
{
11-
public string? RequestId { get; set; }
11+
public string RequestId { get; set; }
1212

13-
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
13+
public bool ShowRequestId => string.IsNullOrEmpty(RequestId);
1414

1515
private readonly ILogger<ErrorModel> _logger;
1616

@@ -24,4 +24,4 @@ public void OnGet()
2424
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
2525
}
2626
}
27-
}
27+
}

examples/WebAppSimulator/WebAppSimulator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Nullable>enable</Nullable>
5+
<Nullable>disable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)