File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/ModelContextProtocol.Core Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ namespace ModelContextProtocol.Client;
1010/// that connect to MCP servers. It handles the creation and connection
1111/// of appropriate implementations through the supplied transport.
1212/// </remarks>
13+ [ Obsolete ( $ "Use { nameof ( McpClient ) } .{ nameof ( McpClient . CreateAsync ) } instead.") ]
1314public static partial class McpClientFactory
1415{
1516 /// <summary>Creates an <see cref="IMcpClient"/>, connecting it to the specified server.</summary>
@@ -23,7 +24,6 @@ public static partial class McpClientFactory
2324 /// <returns>An <see cref="IMcpClient"/> that's connected to the specified server.</returns>
2425 /// <exception cref="ArgumentNullException"><paramref name="clientTransport"/> is <see langword="null"/>.</exception>
2526 /// <exception cref="ArgumentNullException"><paramref name="clientOptions"/> is <see langword="null"/>.</exception>
26- [ Obsolete ( $ "Use { nameof ( McpClient ) } .{ nameof ( McpClient . CreateAsync ) } instead.") ]
2727 public static async Task < IMcpClient > CreateAsync (
2828 IClientTransport clientTransport ,
2929 McpClientOptions ? clientOptions = null ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ namespace ModelContextProtocol.Server;
1010/// This is the recommended way to create <see cref="IMcpServer"/> instances.
1111/// The factory handles proper initialization of server instances with the required dependencies.
1212/// </remarks>
13+ [ Obsolete ( $ "Use { nameof ( McpServer ) } .{ nameof ( McpServer . Create ) } instead.") ]
1314public static class McpServerFactory
1415{
1516 /// <summary>
@@ -22,7 +23,6 @@ public static class McpServerFactory
2223 /// <returns>An <see cref="IMcpServer"/> instance that should be disposed when no longer needed.</returns>
2324 /// <exception cref="ArgumentNullException"><paramref name="transport"/> is <see langword="null"/>.</exception>
2425 /// <exception cref="ArgumentNullException"><paramref name="serverOptions"/> is <see langword="null"/>.</exception>
25- [ Obsolete ( $ "Use { nameof ( McpServer ) } .{ nameof ( McpServer . Create ) } instead.") ]
2626 public static IMcpServer Create (
2727 ITransport transport ,
2828 McpServerOptions serverOptions ,
You can’t perform that action at this time.
0 commit comments