Skip to content

Commit

Permalink
Исправляет предупреждения
Browse files Browse the repository at this point in the history
  • Loading branch information
inyutin-maxim committed Sep 11, 2023
1 parent 5966239 commit f7a3334
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<LangVersion>latest</LangVersion>
<CoreVersion>6.0.31201</CoreVersion>
<MsTestTool>17.7.2</MsTestTool>
<WarningsAsErrors>CS1591;REO00038;REO00039;REO00040;REO00042;REO00043;REO00044;REO00051;REO00059;REO00060;REO00065</WarningsAsErrors>
<WarningsAsErrors>CS1591;REO03004;REO03005;REO04001;REO06005;REO10001;REO10002;REO12003;REO13003;REO13004;REO13005;REO13001;REO13002;REO13006;REO13008;REO13009;REO17001</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="AsyncFixer" Version="1.6.0" PrivateAssets="all"/>
Expand Down
2 changes: 1 addition & 1 deletion VkNet.Tests/Models/GroupChangeSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void GroupChangeSettings_should_correct_deserialize_from_JsonConverter()
result.Should()
.NotBeNull();

if (result == null)
if (result is null)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion VkNet.Tests/Models/SerializableTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void ModelsShouldHaveSerializableAttribute()
var models = typeof(VkApi).Assembly
.GetTypes()
.Where(x =>
x.Namespace != null
x.Namespace is not null
&& x.Namespace.StartsWith("VkNet.Model")
&& !x.Attributes.HasFlag(TypeAttributes.Serializable)
&& !x.IsInterface)
Expand Down
20 changes: 0 additions & 20 deletions VkNet.Tests/Utils/BotsLongPoolUpdatesHandlerTests.cs

This file was deleted.

6 changes: 5 additions & 1 deletion VkNet/Utils/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public Task<HttpResponse<string>> PostAsync(Uri uri, IEnumerable<KeyValuePair<st
if (_logger is not null)
{
var json = JsonConvert.SerializeObject(parameters);
_logger.LogDebug("POST request: {Uri}{NewLine}{PrettyJson}", uri, Environment.NewLine, Utilities.PrettyPrintJson(json));

if (_logger.IsEnabled(LogLevel.Debug))
{
_logger.LogDebug("POST request: {Uri}{NewLine}{PrettyJson}", uri, Environment.NewLine, Utilities.PrettyPrintJson(json));
}
}

if (headers is not null && headers.Any())
Expand Down

0 comments on commit f7a3334

Please sign in to comment.