Obsolete Roots, Sampling, and Logging surface area per SEP-2577 (#1651)
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
This commit is contained in:
parent
9b783d7a3b
commit
8ddb3cc36f
3 changed files with 122 additions and 3 deletions
|
|
@ -165,6 +165,7 @@ public static class McpRequestFilterBuilderExtensions
|
|||
/// <param name="builder">The request filter builder instance.</param>
|
||||
/// <param name="filter">The filter function that wraps the handler.</param>
|
||||
/// <returns>The builder provided in <paramref name="builder"/>.</returns>
|
||||
[Obsolete(Obsoletions.DeprecatedLogging_Message, DiagnosticId = Obsoletions.Deprecated_DiagnosticId, UrlFormat = Obsoletions.Deprecated_Url)]
|
||||
public static IMcpRequestFilterBuilder AddSetLoggingLevelFilter(this IMcpRequestFilterBuilder builder, McpRequestFilter<SetLevelRequestParams, EmptyResult> filter)
|
||||
{
|
||||
Throw.IfNull(builder);
|
||||
|
|
|
|||
|
|
@ -878,6 +878,7 @@ public static partial class McpServerBuilderExtensions
|
|||
/// most recently set level.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Obsolete(Obsoletions.DeprecatedLogging_Message, DiagnosticId = Obsoletions.Deprecated_DiagnosticId, UrlFormat = Obsoletions.Deprecated_Url)]
|
||||
public static IMcpServerBuilder WithSetLoggingLevelHandler(this IMcpServerBuilder builder, McpRequestHandler<SetLevelRequestParams, EmptyResult> handler)
|
||||
{
|
||||
Throw.IfNull(builder);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<!-- CS0436: Allow ObsoleteAttribute to be redefined internally -->
|
||||
<NoWarn>$(NoWarn);CS0436</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Common\Throw.cs" Link="Throw.cs" />
|
||||
<Compile Include="..\Common\Obsoletions.cs" Link="Obsoletions.cs" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue