Improve how to host McpServer (#30)

This commit is contained in:
Toni Wenzel 2025-03-05 21:15:22 +01:00 • committed by GitHub
commit 257a97a659
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,22 @@
using Microsoft.Extensions.DependencyInjection;
namespace McpDotNet.Configuration;
/// <summary>
/// Default implementation of <see cref="IMcpServerBuilder"/>.
/// </summary>
internal class DefaultMcpServerBuilder : IMcpServerBuilder
{
/// <inheritdoc/>
public IServiceCollection Services { get; }
/// <summary>
/// Initializes a new instance of the <see cref="DefaultMcpServerBuilder"/> class.
/// </summary>
/// <param name="services"></param>
/// <exception cref="ArgumentNullException"></exception>
public DefaultMcpServerBuilder(IServiceCollection services)
{
Services = services ?? throw new ArgumentNullException(nameof(services));
}
}