Skip to content

Commit e928861

Browse files
committed
Move ConformanceServer to tests and fix naming
1 parent c6d2cfc commit e928861

File tree

10 files changed

+16
-17
lines changed

10 files changed

+16
-17
lines changed

ModelContextProtocol.slnx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<Project Path="samples/AspNetCoreMcpPerSessionTools/AspNetCoreMcpPerSessionTools.csproj" />
4343
<Project Path="samples/AspNetCoreMcpServer/AspNetCoreMcpServer.csproj" />
4444
<Project Path="samples/ChatWithTools/ChatWithTools.csproj" />
45-
<Project Path="samples/ComplianceServer/ComplianceServer.csproj" />
4645
<Project Path="samples/EverythingServer/EverythingServer.csproj" />
4746
<Project Path="samples/InMemoryTransport/InMemoryTransport.csproj" />
4847
<Project Path="samples/ProtectedMcpClient/ProtectedMcpClient.csproj" />
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<ProjectReference Include="..\..\src\ModelContextProtocol.AspNetCore\ModelContextProtocol.AspNetCore.csproj" />
10+
<ProjectReference Include="../../../src/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj" />
1111
</ItemGroup>
1212

1313
</Project>

samples/ComplianceServer/Program.cs renamed to tests/Conformance/ConformanceServer/Program.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using ComplianceServer;
2-
using ComplianceServer.Prompts;
3-
using ComplianceServer.Resources;
4-
using ComplianceServer.Tools;
1+
using ConformanceServer;
2+
using ConformanceServer.Prompts;
3+
using ConformanceServer.Resources;
4+
using ConformanceServer.Tools;
55
using Microsoft.Extensions.AI;
66
using ModelContextProtocol;
77
using ModelContextProtocol.Protocol;
@@ -18,9 +18,9 @@
1818
builder.Services
1919
.AddMcpServer()
2020
.WithHttpTransport()
21-
.WithTools<ComplianceTools>()
22-
.WithPrompts<CompliancePrompts>()
23-
.WithResources<ComplianceResources>()
21+
.WithTools<ConformanceTools>()
22+
.WithPrompts<ConformancePrompts>()
23+
.WithResources<ConformanceResources>()
2424
.WithSubscribeToResourcesHandler(async (ctx, ct) =>
2525
{
2626
if (ctx.Server.SessionId == null)

samples/ComplianceServer/Prompts/CompliancePrompts.cs renamed to tests/Conformance/ConformanceServer/Prompts/ConformancePrompts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using Microsoft.Extensions.AI;
44
using System.ComponentModel;
55

6-
namespace ComplianceServer.Prompts;
6+
namespace ConformanceServer.Prompts;
77

8-
public class CompliancePrompts
8+
public class ConformancePrompts
99
{
1010
// Sample base64 encoded 1x1 red PNG pixel for testing
1111
private const string TestImageBase64 =

samples/ComplianceServer/Resources/ComplianceResources.cs renamed to tests/Conformance/ConformanceServer/Resources/ConformanceResources.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
using System.ComponentModel;
44
using System.Text.Json;
55

6-
namespace ComplianceServer.Resources;
6+
namespace ConformanceServer.Resources;
77

88
[McpServerResourceType]
9-
public class ComplianceResources
9+
public class ConformanceResources
1010
{
1111
// Sample base64 encoded 1x1 red PNG pixel for testing
1212
private const string TestImageBase64 =

samples/ComplianceServer/Tools/ComplianceTools.cs renamed to tests/Conformance/ConformanceServer/Tools/ConformanceTools.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
using System.ComponentModel;
55
using System.Text.Json;
66

7-
namespace ComplianceServer.Tools;
7+
namespace ConformanceServer.Tools;
88

99
[McpServerToolType]
10-
public class ComplianceTools
10+
public class ConformanceTools
1111
{
1212
// Sample base64 encoded 1x1 red PNG pixel for testing
1313
private const string TestImageBase64 =
@@ -109,7 +109,7 @@ public static async Task<string> ToolWithLogging(
109109

110110
// Use ILogger for logging (will be forwarded to client if supported)
111111
ILoggerProvider loggerProvider = server.AsClientLoggerProvider();
112-
ILogger logger = loggerProvider.CreateLogger("ComplianceTools");
112+
ILogger logger = loggerProvider.CreateLogger("ConformanceTools");
113113

114114
logger.LogInformation("Tool execution started");
115115
await Task.Delay(50, cancellationToken);

0 commit comments

Comments
 (0)