Fix some code smells (#39)
* Fix some code smells * Fix build * Fix come issues * Revert some changes
This commit is contained in:
parent
04af21046b
commit
709b2e0a74
4 changed files with 270 additions and 244 deletions
|
|
@ -47,5 +47,6 @@ public class ClientIntegrationTestFixture : IDisposable
|
|||
public void Dispose()
|
||||
{
|
||||
LoggerFactory?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -60,7 +60,9 @@ public class EverythingSseServerFixture : IAsyncDisposable
|
|||
catch (Exception ex)
|
||||
{
|
||||
// Log the exception but don't throw
|
||||
Console.Error.WriteLine($"Error stopping Docker container: {ex.Message}");
|
||||
await Console.Error.WriteLineAsync($"Error stopping Docker container: {ex.Message}");
|
||||
}
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -153,10 +153,13 @@ public class McpServerBuilderExtensionsToolsTests
|
|||
{
|
||||
public EchoToolWithDi(IDependendService service)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[McpTool, Description("Echoes the input back to the client.")]
|
||||
#pragma warning disable CA1822 // Mark members as static
|
||||
public Task<string> Echo(string message)
|
||||
#pragma warning restore CA1822 // Mark members as static
|
||||
{
|
||||
return Task.FromResult("hello " + message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,5 +52,6 @@ public class ServerIntegrationTestFixture : IDisposable
|
|||
var client = Factory.GetClientAsync("test_server").Result;
|
||||
client.DisposeAsync().AsTask().Wait();
|
||||
LoggerFactory?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue