Remove unessesary $ and fix some typos (#305)

This commit is contained in:
Mike Alhayek 2025-04-14 07:47:13 -07:00 • committed by GitHub
commit dc544f929b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View file

@ -55,7 +55,7 @@ internal sealed class McpClient : McpEndpoint, IMcpClient
{ {
if (samplingCapability.SamplingHandler is not { } samplingHandler) if (samplingCapability.SamplingHandler is not { } samplingHandler)
{ {
throw new InvalidOperationException($"Sampling capability was set but it did not provide a handler."); throw new InvalidOperationException("Sampling capability was set but it did not provide a handler.");
} }
RequestHandlers.Set( RequestHandlers.Set(
@ -72,7 +72,7 @@ internal sealed class McpClient : McpEndpoint, IMcpClient
{ {
if (rootsCapability.RootsHandler is not { } rootsHandler) if (rootsCapability.RootsHandler is not { } rootsHandler)
{ {
throw new InvalidOperationException($"Roots capability was set but it did not provide a handler."); throw new InvalidOperationException("Roots capability was set but it did not provide a handler.");
} }
RequestHandlers.Set( RequestHandlers.Set(

View file

@ -145,7 +145,7 @@ public static class McpClientExtensions
/// </para> /// </para>
/// <para> /// <para>
/// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientTool}"/> /// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientTool}"/>
/// will result in requerying the server and yielding the sequence of available tools. /// will result in re-querying the server and yielding the sequence of available tools.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <example> /// <example>
@ -248,7 +248,7 @@ public static class McpClientExtensions
/// </para> /// </para>
/// <para> /// <para>
/// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientPrompt}"/> /// Every iteration through the returned <see cref="IAsyncEnumerable{McpClientPrompt}"/>
/// will result in requerying the server and yielding the sequence of available prompts. /// will result in re-querying the server and yielding the sequence of available prompts.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <example> /// <example>
@ -396,7 +396,7 @@ public static class McpClientExtensions
/// </para> /// </para>
/// <para> /// <para>
/// Every iteration through the returned <see cref="IAsyncEnumerable{ResourceTemplate}"/> /// Every iteration through the returned <see cref="IAsyncEnumerable{ResourceTemplate}"/>
/// will result in requerying the server and yielding the sequence of available resource templates. /// will result in re-querying the server and yielding the sequence of available resource templates.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <example> /// <example>
@ -510,7 +510,7 @@ public static class McpClientExtensions
/// </para> /// </para>
/// <para> /// <para>
/// Every iteration through the returned <see cref="IAsyncEnumerable{Resource}"/> /// Every iteration through the returned <see cref="IAsyncEnumerable{Resource}"/>
/// will result in requerying the server and yielding the sequence of available resources. /// will result in re-querying the server and yielding the sequence of available resources.
/// </para> /// </para>
/// </remarks> /// </remarks>
/// <example> /// <example>

View file

@ -37,7 +37,7 @@ public readonly struct ProgressToken : IEquatable<ProgressToken>
/// <inheritdoc /> /// <inheritdoc />
public override string? ToString() => public override string? ToString() =>
_token is string stringValue ? $"{stringValue}" : _token is string stringValue ? stringValue :
_token is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) : _token is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) :
null; null;

View file

@ -263,7 +263,7 @@ internal sealed class AIFunctionMcpServerPrompt : McpServerPrompt
Messages = [.. chatMessages.SelectMany(chatMessage => chatMessage.ToPromptMessages())], Messages = [.. chatMessages.SelectMany(chatMessage => chatMessage.ToPromptMessages())],
}, },
null => throw new InvalidOperationException($"Null result returned from prompt function."), null => throw new InvalidOperationException("Null result returned from prompt function."),
_ => throw new InvalidOperationException($"Unknown result type '{result.GetType()}' returned from prompt function."), _ => throw new InvalidOperationException($"Unknown result type '{result.GetType()}' returned from prompt function."),
}; };