diff --git a/dotnet/src/Client.cs b/dotnet/src/Client.cs index 254f03af2..2c5d57e9e 100644 --- a/dotnet/src/Client.cs +++ b/dotnet/src/Client.cs @@ -2,21 +2,20 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ +using GitHub.Copilot.SDK.Rpc; using Microsoft.Extensions.AI; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using System.Collections.Concurrent; using System.Data; using System.Diagnostics; +using System.Globalization; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; -using System.Text.Json.Serialization.Metadata; using System.Text.RegularExpressions; -using GitHub.Copilot.SDK.Rpc; -using System.Globalization; using static GitHub.Copilot.SDK.LoggingHelpers; namespace GitHub.Copilot.SDK; @@ -533,6 +532,8 @@ private static (SystemMessageConfig? wireConfig, Dictionary public async Task CreateSessionAsync(SessionConfig config, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(config); + if (config.OnPermissionRequest == null) { throw new ArgumentException( @@ -692,6 +693,9 @@ public async Task CreateSessionAsync(SessionConfig config, Cance /// public async Task ResumeSessionAsync(string sessionId, ResumeSessionConfig config, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(sessionId); + ArgumentNullException.ThrowIfNull(config); + if (config.OnPermissionRequest == null) { throw new ArgumentException( @@ -991,6 +995,8 @@ public async Task> ListModelsAsync(CancellationToken cancellati /// public async Task DeleteSessionAsync(string sessionId, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(sessionId); + var connection = await EnsureConnectedAsync(cancellationToken); var response = await InvokeRpcAsync( @@ -1052,6 +1058,8 @@ public async Task> ListSessionsAsync(SessionListFilter? f /// public async Task GetSessionMetadataAsync(string sessionId, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(sessionId); + var connection = await EnsureConnectedAsync(cancellationToken); var response = await InvokeRpcAsync( @@ -1105,6 +1113,8 @@ public async Task> ListSessionsAsync(SessionListFilter? f /// public async Task SetForegroundSessionIdAsync(string sessionId, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(sessionId); + var connection = await EnsureConnectedAsync(cancellationToken); var response = await InvokeRpcAsync( @@ -1135,6 +1145,8 @@ public async Task SetForegroundSessionIdAsync(string sessionId, CancellationToke /// public IDisposable On(Action handler) { + ArgumentNullException.ThrowIfNull(handler); + lock (_lifecycleHandlersLock) { _lifecycleHandlers.Add(handler); @@ -1165,6 +1177,9 @@ public IDisposable On(Action handler) /// public IDisposable On(string eventType, Action handler) { + ArgumentNullException.ThrowIfNull(eventType); + ArgumentNullException.ThrowIfNull(handler); + lock (_lifecycleHandlersLock) { if (!_typedLifecycleHandlers.TryGetValue(eventType, out var handlers)) @@ -1172,6 +1187,7 @@ public IDisposable On(string eventType, Action handler) handlers = []; _typedLifecycleHandlers[eventType] = handlers; } + handlers.Add(handler); } diff --git a/dotnet/src/JsonRpc.cs b/dotnet/src/JsonRpc.cs index 0fb3e32ad..a97d0baed 100644 --- a/dotnet/src/JsonRpc.cs +++ b/dotnet/src/JsonRpc.cs @@ -2,18 +2,17 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using System.Buffers; using System.Collections.Concurrent; using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; using System.Text.Unicode; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; namespace GitHub.Copilot.SDK; diff --git a/dotnet/src/Polyfills/DownlevelExtensions.cs b/dotnet/src/Polyfills/DownlevelExtensions.cs index 80aaa5bbb..0f5fe28cd 100644 --- a/dotnet/src/Polyfills/DownlevelExtensions.cs +++ b/dotnet/src/Polyfills/DownlevelExtensions.cs @@ -5,11 +5,9 @@ using System.Buffers; using System.ComponentModel; using System.Globalization; -using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; -using System.Threading.Tasks; namespace System { diff --git a/dotnet/src/Polyfills/Utf8.cs b/dotnet/src/Polyfills/Utf8.cs index 5e86b5bf9..a87506e99 100644 --- a/dotnet/src/Polyfills/Utf8.cs +++ b/dotnet/src/Polyfills/Utf8.cs @@ -2,8 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Text; - namespace System.Text.Unicode; internal static class Utf8 diff --git a/dotnet/src/Session.cs b/dotnet/src/Session.cs index 90e434380..d7249824a 100644 --- a/dotnet/src/Session.cs +++ b/dotnet/src/Session.cs @@ -186,6 +186,8 @@ private Task InvokeRpcAsync(string method, object?[]? args, CancellationTo /// public async Task SendAsync(MessageOptions options, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(options); + var (traceparent, tracestate) = TelemetryHelpers.GetTraceContext(); var request = new SendMessageRequest @@ -243,6 +245,8 @@ public async Task SendAsync(MessageOptions options, CancellationToken ca TimeSpan? timeout = null, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(options); + var totalTimestamp = Stopwatch.GetTimestamp(); var effectiveTimeout = timeout ?? TimeSpan.FromSeconds(60); var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); @@ -361,6 +365,8 @@ void Handler(SessionEvent evt) /// public IDisposable On(SessionEventHandler handler) { + ArgumentNullException.ThrowIfNull(handler); + ImmutableInterlocked.Update(ref _eventHandlers, array => array.Add(handler)); return new ActionDisposable(() => ImmutableInterlocked.Update(ref _eventHandlers, array => array.Remove(handler))); } @@ -1320,6 +1326,8 @@ await InvokeRpcAsync( /// public async Task SetModelAsync(string model, string? reasoningEffort, ModelCapabilitiesOverride? modelCapabilities = null, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(model); + await Rpc.Model.SwitchToAsync(model, reasoningEffort, reasoningSummary: null, modelCapabilities: modelCapabilities, cancellationToken: cancellationToken); } @@ -1351,6 +1359,8 @@ public Task SetModelAsync(string model, CancellationToken cancellationToken = de /// public async Task LogAsync(string message, SessionLogLevel? level = null, bool? ephemeral = null, string? url = null, CancellationToken cancellationToken = default) { + ArgumentNullException.ThrowIfNull(message); + await Rpc.LogAsync(message, level, ephemeral, url, cancellationToken); } diff --git a/dotnet/src/SessionFsProvider.cs b/dotnet/src/SessionFsProvider.cs index 6007dd081..25230244c 100644 --- a/dotnet/src/SessionFsProvider.cs +++ b/dotnet/src/SessionFsProvider.cs @@ -79,6 +79,8 @@ public abstract class SessionFsProvider : ISessionFsHandler async Task ISessionFsHandler.ReadFileAsync(SessionFsReadFileRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { var content = await ReadFileAsync(request.Path, cancellationToken).ConfigureAwait(false); @@ -92,6 +94,8 @@ async Task ISessionFsHandler.ReadFileAsync(SessionFsRea async Task ISessionFsHandler.WriteFileAsync(SessionFsWriteFileRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { await WriteFileAsync(request.Path, request.Content, (int?)request.Mode, cancellationToken).ConfigureAwait(false); @@ -105,6 +109,8 @@ async Task ISessionFsHandler.ReadFileAsync(SessionFsRea async Task ISessionFsHandler.AppendFileAsync(SessionFsAppendFileRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { await AppendFileAsync(request.Path, request.Content, (int?)request.Mode, cancellationToken).ConfigureAwait(false); @@ -118,6 +124,8 @@ async Task ISessionFsHandler.ReadFileAsync(SessionFsRea async Task ISessionFsHandler.ExistsAsync(SessionFsExistsRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { var exists = await ExistsAsync(request.Path, cancellationToken).ConfigureAwait(false); @@ -131,6 +139,8 @@ async Task ISessionFsHandler.ExistsAsync(SessionFsExistsR async Task ISessionFsHandler.StatAsync(SessionFsStatRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { return await StatAsync(request.Path, cancellationToken).ConfigureAwait(false); @@ -143,6 +153,8 @@ async Task ISessionFsHandler.StatAsync(SessionFsStatRequest async Task ISessionFsHandler.MkdirAsync(SessionFsMkdirRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { await MkdirAsync(request.Path, request.Recursive ?? false, (int?)request.Mode, cancellationToken).ConfigureAwait(false); @@ -156,6 +168,8 @@ async Task ISessionFsHandler.StatAsync(SessionFsStatRequest async Task ISessionFsHandler.ReaddirAsync(SessionFsReaddirRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { var entries = await ReaddirAsync(request.Path, cancellationToken).ConfigureAwait(false); @@ -169,6 +183,8 @@ async Task ISessionFsHandler.ReaddirAsync(SessionFsReadd async Task ISessionFsHandler.ReaddirWithTypesAsync(SessionFsReaddirWithTypesRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { var entries = await ReaddirWithTypesAsync(request.Path, cancellationToken).ConfigureAwait(false); @@ -182,6 +198,8 @@ async Task ISessionFsHandler.ReaddirWithTypesAs async Task ISessionFsHandler.RmAsync(SessionFsRmRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { await RmAsync(request.Path, request.Recursive ?? false, request.Force ?? false, cancellationToken).ConfigureAwait(false); @@ -195,6 +213,8 @@ async Task ISessionFsHandler.ReaddirWithTypesAs async Task ISessionFsHandler.RenameAsync(SessionFsRenameRequest request, CancellationToken cancellationToken) { + ArgumentNullException.ThrowIfNull(request); + try { await RenameAsync(request.Src, request.Dest, cancellationToken).ConfigureAwait(false); diff --git a/dotnet/src/Types.cs b/dotnet/src/Types.cs index e387f91fe..e8245f97d 100644 --- a/dotnet/src/Types.cs +++ b/dotnet/src/Types.cs @@ -2,14 +2,14 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ +using GitHub.Copilot.SDK.Rpc; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Text.Json.Serialization; -using GitHub.Copilot.SDK.Rpc; -using Microsoft.Extensions.AI; -using Microsoft.Extensions.Logging; namespace GitHub.Copilot.SDK; diff --git a/dotnet/test/ConnectionTokenTests.cs b/dotnet/test/ConnectionTokenTests.cs index 499c9d36e..dc6f115ba 100644 --- a/dotnet/test/ConnectionTokenTests.cs +++ b/dotnet/test/ConnectionTokenTests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System; using GitHub.Copilot.SDK.Test.Harness; using Xunit; diff --git a/dotnet/test/E2E/AbortE2ETests.cs b/dotnet/test/E2E/AbortE2ETests.cs index 910038d1b..009ca1e29 100644 --- a/dotnet/test/E2E/AbortE2ETests.cs +++ b/dotnet/test/E2E/AbortE2ETests.cs @@ -2,9 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.ComponentModel; -using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; +using System.ComponentModel; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/BuiltinToolsE2ETests.cs b/dotnet/test/E2E/BuiltinToolsE2ETests.cs index 6fcb3e69d..76bbcf190 100644 --- a/dotnet/test/E2E/BuiltinToolsE2ETests.cs +++ b/dotnet/test/E2E/BuiltinToolsE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/ClientOptionsE2ETests.cs b/dotnet/test/E2E/ClientOptionsE2ETests.cs index 14263de79..af17205c0 100644 --- a/dotnet/test/E2E/ClientOptionsE2ETests.cs +++ b/dotnet/test/E2E/ClientOptionsE2ETests.cs @@ -7,7 +7,6 @@ using System.Net; using System.Net.Sockets; using System.Text.Json; -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/CommandsE2ETests.cs b/dotnet/test/E2E/CommandsE2ETests.cs index f968e9264..fd5e2165a 100644 --- a/dotnet/test/E2E/CommandsE2ETests.cs +++ b/dotnet/test/E2E/CommandsE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/ElicitationE2ETests.cs b/dotnet/test/E2E/ElicitationE2ETests.cs index fb6469ecf..ca2714402 100644 --- a/dotnet/test/E2E/ElicitationE2ETests.cs +++ b/dotnet/test/E2E/ElicitationE2ETests.cs @@ -3,7 +3,6 @@ *--------------------------------------------------------------------------------------------*/ using GitHub.Copilot.SDK.Rpc; -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/ErrorResilienceE2ETests.cs b/dotnet/test/E2E/ErrorResilienceE2ETests.cs index 82da8cc62..4899f1386 100644 --- a/dotnet/test/E2E/ErrorResilienceE2ETests.cs +++ b/dotnet/test/E2E/ErrorResilienceE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs b/dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs index a6627302b..d1e483779 100644 --- a/dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs +++ b/dotnet/test/E2E/HookLifecycleAndOutputE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/MultiClientE2ETests.cs b/dotnet/test/E2E/MultiClientE2ETests.cs index 88c6f5cf8..bd939a6cf 100644 --- a/dotnet/test/E2E/MultiClientE2ETests.cs +++ b/dotnet/test/E2E/MultiClientE2ETests.cs @@ -2,11 +2,10 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Collections.Concurrent; -using System.ComponentModel; -using System.Text.RegularExpressions; using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; +using System.Collections.Concurrent; +using System.ComponentModel; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/MultiTurnE2ETests.cs b/dotnet/test/E2E/MultiTurnE2ETests.cs index 0950a1bfd..b10acfbc2 100644 --- a/dotnet/test/E2E/MultiTurnE2ETests.cs +++ b/dotnet/test/E2E/MultiTurnE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/PendingWorkResumeE2ETests.cs b/dotnet/test/E2E/PendingWorkResumeE2ETests.cs index 6656af653..f78ba0d70 100644 --- a/dotnet/test/E2E/PendingWorkResumeE2ETests.cs +++ b/dotnet/test/E2E/PendingWorkResumeE2ETests.cs @@ -2,9 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.ComponentModel; using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; +using System.ComponentModel; using Xunit; using Xunit.Abstractions; using RpcPermissionDecisionApproveOnce = GitHub.Copilot.SDK.Rpc.PermissionDecisionApproveOnce; diff --git a/dotnet/test/E2E/RpcEventSideEffectsE2ETests.cs b/dotnet/test/E2E/RpcEventSideEffectsE2ETests.cs index 3f0a61d03..821b1be43 100644 --- a/dotnet/test/E2E/RpcEventSideEffectsE2ETests.cs +++ b/dotnet/test/E2E/RpcEventSideEffectsE2ETests.cs @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using GitHub.Copilot.SDK.Rpc; +using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/RpcMcpConfigE2ETests.cs b/dotnet/test/E2E/RpcMcpConfigE2ETests.cs index 8dc977d0f..179fc4828 100644 --- a/dotnet/test/E2E/RpcMcpConfigE2ETests.cs +++ b/dotnet/test/E2E/RpcMcpConfigE2ETests.cs @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Text.Json; using GitHub.Copilot.SDK.Rpc; +using System.Text.Json; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/RpcServerE2ETests.cs b/dotnet/test/E2E/RpcServerE2ETests.cs index 5daad9f07..aef8a2fbc 100644 --- a/dotnet/test/E2E/RpcServerE2ETests.cs +++ b/dotnet/test/E2E/RpcServerE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Rpc; using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/RpcSessionStateE2ETests.cs b/dotnet/test/E2E/RpcSessionStateE2ETests.cs index 56821e90f..9b0b4df3b 100644 --- a/dotnet/test/E2E/RpcSessionStateE2ETests.cs +++ b/dotnet/test/E2E/RpcSessionStateE2ETests.cs @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using GitHub.Copilot.SDK.Rpc; +using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/RpcShellAndFleetE2ETests.cs b/dotnet/test/E2E/RpcShellAndFleetE2ETests.cs index a35e5de41..ee9ebb27d 100644 --- a/dotnet/test/E2E/RpcShellAndFleetE2ETests.cs +++ b/dotnet/test/E2E/RpcShellAndFleetE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Rpc; using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; using Xunit; diff --git a/dotnet/test/E2E/SessionConfigE2ETests.cs b/dotnet/test/E2E/SessionConfigE2ETests.cs index ddd44ea0d..43d6681b7 100644 --- a/dotnet/test/E2E/SessionConfigE2ETests.cs +++ b/dotnet/test/E2E/SessionConfigE2ETests.cs @@ -2,10 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Linq; -using System.Text.Json; using GitHub.Copilot.SDK.Rpc; using GitHub.Copilot.SDK.Test.Harness; +using System.Text.Json; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/SessionE2ETests.cs b/dotnet/test/E2E/SessionE2ETests.cs index 15aa3543d..e577cd4a8 100644 --- a/dotnet/test/E2E/SessionE2ETests.cs +++ b/dotnet/test/E2E/SessionE2ETests.cs @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using GitHub.Copilot.SDK.Rpc; +using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; using System.Collections.Concurrent; using System.ComponentModel; diff --git a/dotnet/test/E2E/StreamingFidelityE2ETests.cs b/dotnet/test/E2E/StreamingFidelityE2ETests.cs index c6977c8e9..82580a656 100644 --- a/dotnet/test/E2E/StreamingFidelityE2ETests.cs +++ b/dotnet/test/E2E/StreamingFidelityE2ETests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using GitHub.Copilot.SDK.Test.Harness; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/SuspendE2ETests.cs b/dotnet/test/E2E/SuspendE2ETests.cs index af9d8284f..44dcef7dd 100644 --- a/dotnet/test/E2E/SuspendE2ETests.cs +++ b/dotnet/test/E2E/SuspendE2ETests.cs @@ -2,9 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.ComponentModel; -using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.AI; +using System.ComponentModel; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/E2E/ToolsE2ETests.cs b/dotnet/test/E2E/ToolsE2ETests.cs index 4ecabf96d..529223894 100644 --- a/dotnet/test/E2E/ToolsE2ETests.cs +++ b/dotnet/test/E2E/ToolsE2ETests.cs @@ -6,7 +6,6 @@ using Microsoft.Extensions.AI; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; using Xunit; diff --git a/dotnet/test/Harness/E2ETestBase.cs b/dotnet/test/Harness/E2ETestBase.cs index 299616d28..d7b76a654 100644 --- a/dotnet/test/Harness/E2ETestBase.cs +++ b/dotnet/test/Harness/E2ETestBase.cs @@ -2,10 +2,10 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Data; -using System.Reflection; using GitHub.Copilot.SDK.Test.Harness; using Microsoft.Extensions.Logging; +using System.Data; +using System.Reflection; using Xunit; using Xunit.Abstractions; diff --git a/dotnet/test/Harness/E2ETestContext.cs b/dotnet/test/Harness/E2ETestContext.cs index 19777e09b..6c7d4d808 100644 --- a/dotnet/test/Harness/E2ETestContext.cs +++ b/dotnet/test/Harness/E2ETestContext.cs @@ -2,9 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ +using Microsoft.Extensions.Logging; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; -using Microsoft.Extensions.Logging; namespace GitHub.Copilot.SDK.Test.Harness; diff --git a/dotnet/test/Unit/CloneTests.cs b/dotnet/test/Unit/CloneTests.cs index dd94d05ae..4b912d5d5 100644 --- a/dotnet/test/Unit/CloneTests.cs +++ b/dotnet/test/Unit/CloneTests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using Microsoft.Extensions.AI; using Xunit; namespace GitHub.Copilot.SDK.Test.Unit; diff --git a/dotnet/test/Unit/JsonRpcTests.cs b/dotnet/test/Unit/JsonRpcTests.cs index a62a3dbe8..f4101956f 100644 --- a/dotnet/test/Unit/JsonRpcTests.cs +++ b/dotnet/test/Unit/JsonRpcTests.cs @@ -5,7 +5,6 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization.Metadata; -using GitHub.Copilot.SDK.Rpc; using Xunit; namespace GitHub.Copilot.SDK.Test.Unit; diff --git a/dotnet/test/Unit/SerializationTests.cs b/dotnet/test/Unit/SerializationTests.cs index e18c10994..b1f769c22 100644 --- a/dotnet/test/Unit/SerializationTests.cs +++ b/dotnet/test/Unit/SerializationTests.cs @@ -4,7 +4,6 @@ using Xunit; using System.Text.Json; -using System.Text.Json.Serialization; #if !NET8_0_OR_GREATER using System.Runtime.Serialization; #endif diff --git a/dotnet/test/Unit/SessionEventSerializationTests.cs b/dotnet/test/Unit/SessionEventSerializationTests.cs index dd178e49d..9299d2f2c 100644 --- a/dotnet/test/Unit/SessionEventSerializationTests.cs +++ b/dotnet/test/Unit/SessionEventSerializationTests.cs @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. *--------------------------------------------------------------------------------------------*/ -using System.Collections.Generic; using System.Text.Json; using Xunit;