From 1927994d705da6cab7a8d062e8dd0de9ad55a9a0 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 09:56:13 +0000 Subject: [PATCH 1/2] refactor: remove empty interpolated string This PR simplifies string usage by removing unnecessary interpolated string syntax where no expressions were used. - Empty interpolated string: The code declared a string using `$"AggregateService"` without any embedded expressions, which is effectively a normal string literal. The fix removes the `$` prefix and converts it to a standard string literal (`"AggregateService"`), improving readability and eliminating redundant syntax. > This Autofix was generated by AI. Please review the change before merging. --- Shared.EventStore/Aggregate/AggregateService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared.EventStore/Aggregate/AggregateService.cs b/Shared.EventStore/Aggregate/AggregateService.cs index dbad9b7c..0935503f 100644 --- a/Shared.EventStore/Aggregate/AggregateService.cs +++ b/Shared.EventStore/Aggregate/AggregateService.cs @@ -183,7 +183,7 @@ public async Task> Get(Guid aggregateId, IAggregateRepository repository = this.AggregateRepositoryResolver.Resolve(); String g = typeof(TAggregate).Name; - String m = $"AggregateService"; + String m = "AggregateService"; Counter counterCalls = AggregateService.GetCounterMetric($"{m}_{g}_times_rehydrated"); Histogram histogramMetric = AggregateService.GetHistogramMetric($"{m}_{g}_rehydrated"); From 383d45a21335b0736ce06287c52b0e681758565b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 09:56:44 +0000 Subject: [PATCH 2/2] style: format code with dotnet-format This commit fixes the style issues introduced in 1927994 according to the output from dotnet-format. Details: https://github.com/TransactionProcessing/Shared/pull/372 --- Shared.EventStore/Aggregate/AggregateService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Shared.EventStore/Aggregate/AggregateService.cs b/Shared.EventStore/Aggregate/AggregateService.cs index 0935503f..808ef4a7 100644 --- a/Shared.EventStore/Aggregate/AggregateService.cs +++ b/Shared.EventStore/Aggregate/AggregateService.cs @@ -87,10 +87,12 @@ internal void SetCache((Type, MemoryCacheEntryOptions, Object) aggre this.Cache.Set(key, aggregate, aggregateType.Item2); } - public void AddCachedAggregate(Type aggregateType, MemoryCacheEntryOptions memoryCacheEntryOptions = null) { + public void AddCachedAggregate(Type aggregateType, MemoryCacheEntryOptions memoryCacheEntryOptions = null) + { MemoryCacheEntryOptions localMemoryCacheEntryOptions = DefaultMemoryCacheEntryOptions; - if (memoryCacheEntryOptions != null) { + if (memoryCacheEntryOptions != null) + { localMemoryCacheEntryOptions = memoryCacheEntryOptions; }