Skip to content

Commit 56a8e23

Browse files
Copilotrokonec
andauthored
fix: Suppress CA1873 at file level in SemanticKernelAgent sample (#306)
* Initial plan * Fix CA1873: Replace LogInformation calls with [LoggerMessage] source-generated methods Co-authored-by: rokonec <25249058+rokonec@users.noreply.github.com> * Refactor: move [LoggerMessage] methods to dedicated internal Log class, remove partial from CurrencyPlugin and SemanticKernelTravelAgent Co-authored-by: rokonec <25249058+rokonec@users.noreply.github.com> * Simplify: replace Log partial class with file-level CA1873 pragma suppression Co-authored-by: rokonec <25249058+rokonec@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rokonec <25249058+rokonec@users.noreply.github.com>
1 parent ca15463 commit 56a8e23

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

samples/SemanticKernelAgent/SemanticKernelTravelAgent.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using A2A;
1+
#pragma warning disable CA1873 // Avoid unnecessary lazy evaluation (coding sample — simplicity over micro-optimisation)
2+
using A2A;
23
using Microsoft.Extensions.Configuration;
34
using Microsoft.Extensions.Logging;
45
using Microsoft.SemanticKernel;
@@ -53,8 +54,7 @@ public async Task<string> GetExchangeRateAsync(
5354
{
5455
try
5556
{
56-
_logger.LogInformation("Getting exchange rate from {CurrencyFrom} to {CurrencyTo} for date {Date}",
57-
currencyFrom, currencyTo, date);
57+
_logger.LogInformation("Getting exchange rate from {CurrencyFrom} to {CurrencyTo} for date {Date}", currencyFrom, currencyTo, date);
5858

5959
// Build request URL with query parameters
6060
var requestUri = $"https://api.frankfurter.app/{date}?from={Uri.EscapeDataString(currencyFrom)}&to={Uri.EscapeDataString(currencyTo)}";

0 commit comments

Comments
 (0)