Remove unessesary $ and fix some typos (#305)
This commit is contained in:
parent
9c124b1770
commit
dc544f929b
4 changed files with 8 additions and 8 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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."),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue