This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .AddMcpServer(options => | |
| { | |
| options.ServerInfo = new Implementation | |
| { | |
| Name = "My MCP Server", | |
| Version = "1.0.0", | |
| Title = "My MCP Server", | |
| WebsiteUrl = "http://localhost:5295/", | |
| Icons = [ | |
| new Icon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .WithTools([ | |
| McpServerTool.Create( | |
| typeof(EchoTool).GetMethod(nameof(EchoTool.Echo))!, | |
| options: new McpServerToolCreateOptions | |
| { | |
| Icons = [ | |
| new Icon | |
| { | |
| Source = "http://localhost:5295/echo-icon-light.svg", | |
| MimeType = "image/svg+xml", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [McpServerTool(Title = "Echo", IconSource = "http://localhost:5295/echo-icon.svg")] | |
| public static string Echo(string message) => message; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 1, | |
| "hooks": { | |
| "postToolUse": [ | |
| { | |
| "type": "command", | |
| "powershell": "./.github/hooks/scripts/format-csharp.ps1", | |
| "timeoutSec": 30 | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $input_data = [Console]::In.ReadToEnd() | ConvertFrom-Json | |
| $toolName = $input_data.toolName | |
| $toolArgs = $input_data.toolArgs | ConvertFrom-Json | |
| $filePath = $toolArgs.path | |
| # Only act on edit/create tools touching a .cs file | |
| if ($toolName -notin @("edit", "create")) { exit 0 } | |
| if (-not $filePath.EndsWith(".cs")) { exit 0 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using OpenTelemetry.Resources; | |
| builder.Services.AddOpenTelemetry() | |
| .ConfigureResource(r => r.AddAttributes(new[] | |
| { | |
| new KeyValuePair<string, object>( | |
| "runtime.dotnet.version", | |
| Environment.Version.ToString() | |
| ) | |
| })); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER USER [usr_SampleDB_reader] | |
| WITH NAME = [usr_SampleDB_reader], -- preserve the username | |
| LOGIN = [VLM\lg_SampleDB_dev_db-reader]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [ONT_SampleDB]; | |
| GO | |
| IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'usr_SampleDB_reader') | |
| BEGIN | |
| ALTER USER [usr_SampleDB_reader] WITH LOGIN = [lg_SampleDB_dev_db-reader]; | |
| END | |
| ELSE | |
| BEGIN | |
| CREATE USER [usr_SampleDB_reader] FOR LOGIN [lg_SampleDB_dev_db-reader]; | |
| END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // <auto-generated/> | |
| #nullable enable | |
| #pragma warning disable CS1591 // Compensate for https://github.com/dotnet/roslyn/issues/54103 | |
| partial class ValidateSmtpOptions | |
| { | |
| /// <summary> | |
| /// Validates a specific named options instance (or all when <paramref name="name"/> is <see langword="null" />). | |
| /// </summary> | |
| /// <param name="name">The name of the options instance being validated.</param> | |
| /// <param name="options">The options instance.</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public sealed class AppOptions | |
| { | |
| [ValidateObjectMembers] | |
| public required SmtpOptions Smtp { get; set; } | |
| [ValidateObjectMembers] | |
| public required DatabaseOptions Database { get; set; } | |
| } | |