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;
10
10
/// that connect to MCP servers. It handles the creation and connection
11
11
/// of appropriate implementations through the supplied transport.
12
12
/// </remarks>
13
+ [ Obsolete ( $ "Use { nameof ( McpClient ) } .{ nameof ( McpClient . CreateAsync ) } instead.") ]
13
14
public static partial class McpClientFactory
14
15
{
15
16
/// <summary>Creates an <see cref="IMcpClient"/>, connecting it to the specified server.</summary>
@@ -23,7 +24,6 @@ public static partial class McpClientFactory
23
24
/// <returns>An <see cref="IMcpClient"/> that's connected to the specified server.</returns>
24
25
/// <exception cref="ArgumentNullException"><paramref name="clientTransport"/> is <see langword="null"/>.</exception>
25
26
/// <exception cref="ArgumentNullException"><paramref name="clientOptions"/> is <see langword="null"/>.</exception>
26
- [ Obsolete ( $ "Use { nameof ( McpClient ) } .{ nameof ( McpClient . CreateAsync ) } instead.") ]
27
27
public static async Task < IMcpClient > CreateAsync (
28
28
IClientTransport clientTransport ,
29
29
McpClientOptions ? clientOptions = null ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ namespace ModelContextProtocol.Server;
10
10
/// This is the recommended way to create <see cref="IMcpServer"/> instances.
11
11
/// The factory handles proper initialization of server instances with the required dependencies.
12
12
/// </remarks>
13
+ [ Obsolete ( $ "Use { nameof ( McpServer ) } .{ nameof ( McpServer . Create ) } instead.") ]
13
14
public static class McpServerFactory
14
15
{
15
16
/// <summary>
@@ -22,7 +23,6 @@ public static class McpServerFactory
22
23
/// <returns>An <see cref="IMcpServer"/> instance that should be disposed when no longer needed.</returns>
23
24
/// <exception cref="ArgumentNullException"><paramref name="transport"/> is <see langword="null"/>.</exception>
24
25
/// <exception cref="ArgumentNullException"><paramref name="serverOptions"/> is <see langword="null"/>.</exception>
25
- [ Obsolete ( $ "Use { nameof ( McpServer ) } .{ nameof ( McpServer . Create ) } instead.") ]
26
26
public static IMcpServer Create (
27
27
ITransport transport ,
28
28
McpServerOptions serverOptions ,
You can’t perform that action at this time.
0 commit comments