Skip to content

Commit ea77c36

Browse files
committed
chore: code clean up
1 parent e5ccb7e commit ea77c36

File tree

9 files changed

+7
-19
lines changed

9 files changed

+7
-19
lines changed

src/Cnblogs.DashScope.Core/DashScopeClientWebSocket.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public sealed class DashScopeClientWebSocket : IDisposable
2020
};
2121

2222
private readonly IClientWebSocket _socket;
23+
// ReSharper disable once NotAccessedField.Local
2324
private Task? _receiveTask;
2425
private TaskCompletionSource<bool> _taskStartedSignal = new();
2526
private Channel<byte>? _binaryOutput;

src/Cnblogs.DashScope.Core/Internals/IDashScopeOssUploadConfig.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Text.Json.Serialization;
2-
3-
namespace Cnblogs.DashScope.Core.Internals;
1+
namespace Cnblogs.DashScope.Core.Internals;
42

53
/// <summary>
64
/// Indicates the request have configuration for oss resource resolve.

src/Cnblogs.DashScope.Core/MultimodalMessage.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Text.Json.Serialization;
2-
using Cnblogs.DashScope.Core.Internals;
1+
using Cnblogs.DashScope.Core.Internals;
32

43
namespace Cnblogs.DashScope.Core;
54

@@ -15,7 +14,6 @@ public record MultimodalMessage(
1514
string? ReasoningContent = null)
1615
: IMessage<IReadOnlyList<MultimodalMessageContent>>
1716
{
18-
1917
/// <summary>
2018
/// Create a user message.
2119
/// </summary>

src/Cnblogs.DashScope.Core/MultimodalMessageContent.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System.Text.Json.Serialization;
2-
3-
namespace Cnblogs.DashScope.Core;
1+
namespace Cnblogs.DashScope.Core;
42

53
/// <summary>
64
/// Represents one content of a <see cref="MultimodalMessage"/>.

test/Cnblogs.DashScope.Sdk.UnitTests/DashScopeClientWebSocketWrapperTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Cnblogs.DashScope.Tests.Shared.Utils;
33
using NSubstitute;
44
using NSubstitute.Extensions;
5-
using Xunit.Abstractions;
65

76
namespace Cnblogs.DashScope.Sdk.UnitTests;
87

test/Cnblogs.DashScope.Sdk.UnitTests/UploadSerializationTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ public async Task Upload_GetOssLinkDirectly_SuccessAsync()
7474
public async Task Upload_GetPolicyFailed_ThrowsAsync()
7575
{
7676
// Arrange
77-
const bool sse = false;
7877
var file = Snapshots.File.TestImage;
79-
var policyCase = Snapshots.Upload.GetPolicyNoSse;
80-
var testCase = Snapshots.Upload.UploadTemporaryFileNoSse;
81-
var (client, handler) = await Sut.GetTestClientAsync(
78+
var (client, _) = await Sut.GetTestClientAsync(
8279
new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("null") });
8380

8481
// Act

test/Cnblogs.DashScope.Tests.Shared/Cnblogs.DashScope.Tests.Shared.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
1211
<PackageReference Include="NSubstitute" Version="5.3.0"/>
1312
<PackageReference Include="System.Linq.Async" Version="6.0.3" />
14-
<PackageReference Include="JsonSchema.Net.Generation" Version="4.6.0" />
13+
<PackageReference Include="JsonSchema.Net.Generation" Version="5.1.1" />
1514
<PackageReference Include="xunit" Version="2.9.3" />
1615
</ItemGroup>
1716

test/Cnblogs.DashScope.Tests.Shared/Utils/RequestSnapshot.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Net;
2-
using System.Net.Http.Headers;
32
using System.Text;
43

54
namespace Cnblogs.DashScope.Tests.Shared.Utils;

test/Cnblogs.DashScope.Tests.Shared/Utils/Sut.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Net;
2-
using Cnblogs.DashScope.Core;
1+
using Cnblogs.DashScope.Core;
32
using Cnblogs.DashScope.Core.Internals;
43
using NSubstitute;
54
using NSubstitute.Extensions;

0 commit comments

Comments
 (0)