Styling: remove a few redundant parens from object initializer expressions. (#548)

* Styling: remove a few redundant parens from object initializer expressions.

* Fix build error.
This commit is contained in:
Eirik Tsarpalis 2025-06-26 16:55:54 +03:00 • committed by GitHub
commit 55bda787ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 108 additions and 108 deletions

View file

@ -69,7 +69,7 @@ public partial class McpServerBuilderExtensionsPromptsTests : ClientServerTestBa
case "FirstCustomPrompt":
case "SecondCustomPrompt":
case "FinalCustomPrompt":
return new GetPromptResult()
return new GetPromptResult
{
Messages = [new() { Role = Role.User, Content = new TextContentBlock { Text = $"hello from {request.Params.Name}" } }],
};

View file

@ -99,7 +99,7 @@ public partial class McpServerBuilderExtensionsResourcesTests : ClientServerTest
case "test://Resource3":
case "test://ResourceTemplate1":
case "test://ResourceTemplate2":
return new ReadResourceResult()
return new ReadResourceResult
{
Contents = [new TextResourceContents { Text = request.Params?.Uri ?? "(null)" }]
};

View file

@ -95,7 +95,7 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
case "FirstCustomTool":
case "SecondCustomTool":
case "FinalCustomTool":
return new CallToolResult()
return new CallToolResult
{
Content = [new TextContentBlock { Text = $"{request.Params.Name}Result" }],
};
@ -671,7 +671,7 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
await client.SendNotificationAsync(
NotificationMethods.CancelledNotification,
parameters: new CancelledNotificationParams()
parameters: new CancelledNotificationParams
{
RequestId = requestId,
},