Skip to content

Remove unused container parameter from ClientRegistry resolver registration#1695

Merged
StuartFerguson merged 2 commits intomasterfrom
copilot/remove-unused-method-parameter
Mar 18, 2026
Merged

Remove unused container parameter from ClientRegistry resolver registration#1695
StuartFerguson merged 2 commits intomasterfrom
copilot/remove-unused-method-parameter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

Codacy flagged an unused method parameter in TransactionProcessor/Bootstrapper/ClientRegistry.cs. This change removes the dead parameter without altering the registered resolver behavior.

  • Bootstrapper cleanup

    • Replaced the local factory method with a direct Func<string, string> singleton registration.
    • Preserved the existing service resolution logic for base server URIs.
  • Behavior preserved

    • The resolver still maps a service name to ConfigurationReader.GetBaseServerUri(serviceName).OriginalString.
    • No DI contract or call site behavior changes.
this.AddSingleton<Func<String, String>>(
    serviceName => ConfigurationReader.GetBaseServerUri(serviceName).OriginalString);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • f.feedz.io
    • Triggering command: /usr/bin/dotnet dotnet test /home/REDACTED/work/TransactionProcessor/TransactionProcessor/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj --filter VerifyBootstrapperIsValid --no-restore -nologo (dns block)
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp (dns block)
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/TransactionProcessor/TransactionProcessor/TransactionProcessor.sln --packages /tmp/codeql-scratch-7ae8d40573b4aa77/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-7ae8d40573b4aa77/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-7ae8d40573b4aa77/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[BestPractice] Remove this unused method parameter 'container'.</issue_title>
<issue_description>Codacy ID: 1cfe2dedefb2168999d781843c065015

File: TransactionProcessor/Bootstrapper/ClientRegistry.cs
Line: 31
Rule: BestPractice (Warning)
Commit: d79acef9ce5bbd620c99c680c28672296383815b

Message: Remove this unused method parameter 'container'.

**Code Snippet:**
```csharp
            Func<String, String> resolver(IServiceProvider container) => serviceName => ConfigurationReader.GetBaseServerUri(serviceName).OriginalString; 
```

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] [BestPractice] Remove unused method parameter 'container' Remove unused container parameter from ClientRegistry resolver registration Mar 18, 2026
Copilot AI requested a review from StuartFerguson March 18, 2026 20:27
@StuartFerguson StuartFerguson marked this pull request as ready for review March 18, 2026 20:31
@StuartFerguson StuartFerguson merged commit c2702e9 into master Mar 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BestPractice] Remove this unused method parameter 'container'.

2 participants