using ModelContextProtocol.Protocol;
namespace ModelContextProtocol.Server;
/// Provides an that delegates all operations to an inner .
///
/// This is recommended as a base type when building resources that can be chained around an underlying .
/// The default implementation simply passes each call to the inner resource instance.
///
public abstract class DelegatingMcpServerResource : McpServerResource
{
private readonly McpServerResource _innerResource;
/// Initializes a new instance of the class around the specified .
/// The inner resource wrapped by this delegating resource.
/// is .
protected DelegatingMcpServerResource(McpServerResource innerResource)
{
Throw.IfNull(innerResource);
_innerResource = innerResource;
}
///
public override Resource? ProtocolResource => _innerResource.ProtocolResource;
///
public override ResourceTemplate ProtocolResourceTemplate => _innerResource.ProtocolResourceTemplate;
///
public override IReadOnlyList