Skip to content

Remove unessesary $ and fix some typos #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ModelContextProtocol/Client/McpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public McpClient(IClientTransport clientTransport, McpClientOptions? options, IL
{
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(
Expand All @@ -72,7 +72,7 @@ public McpClient(IClientTransport clientTransport, McpClientOptions? options, IL
{
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(
Expand Down
8 changes: 4 additions & 4 deletions src/ModelContextProtocol/Client/McpClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static async Task<IList<McpClientTool>> ListToolsAsync(
/// </para>
/// <para>
/// 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>
/// </remarks>
/// <example>
Expand Down Expand Up @@ -248,7 +248,7 @@ public static async Task<IList<McpClientPrompt>> ListPromptsAsync(
/// </para>
/// <para>
/// 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>
/// </remarks>
/// <example>
Expand Down Expand Up @@ -396,7 +396,7 @@ public static async Task<IList<ResourceTemplate>> ListResourceTemplatesAsync(
/// </para>
/// <para>
/// 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>
/// </remarks>
/// <example>
Expand Down Expand Up @@ -510,7 +510,7 @@ public static async Task<IList<Resource>> ListResourcesAsync(
/// </para>
/// <para>
/// 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>
/// </remarks>
/// <example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ProgressToken(long value)

/// <inheritdoc />
public override string? ToString() =>
_token is string stringValue ? $"{stringValue}" :
_token is string stringValue ? stringValue :
_token is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) :
null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public override async ValueTask<GetPromptResult> GetAsync(
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."),
};
Expand Down