Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove action delegates for configuration #537

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

johnml1135
Copy link
Collaborator

@johnml1135 johnml1135 commented Nov 5, 2024

This addresses #518.


This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 37.03704% with 17 lines in your changes missing coverage. Please review.

Project coverage is 57.25%. Comparing base (c45a597) to head (0b418c3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
....Shared/Configuration/IMachineBuilderExtensions.cs 0.00% 8 Missing ⚠️
...ared/Configuration/IServiceCollectionExtensions.cs 0.00% 7 Missing ⚠️
...val.Machine.Shared/Configuration/MachineBuilder.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
+ Coverage   56.97%   57.25%   +0.27%     
==========================================
  Files         299      299              
  Lines       15741    15664      -77     
  Branches     2174     2163      -11     
==========================================
- Hits         8969     8968       -1     
+ Misses       6122     6054      -68     
+ Partials      650      642       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnml1135)


src/Machine/src/Serval.Machine.Shared/Configuration/IServiceCollectionExtensions.cs line 5 at r1 (raw file):

public static class IServiceCollectionExtensions
{
    public static IMachineBuilder AddMachine(this IServiceCollection services, IConfiguration? configuration = null)

configuration no longer needs to be optional. Then you won't need to check if configuration is null. You should do the same for the AddServal method as well.

@johnml1135
Copy link
Collaborator Author

src/Machine/src/Serval.Machine.Shared/Configuration/IServiceCollectionExtensions.cs line 5 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

configuration no longer needs to be optional. Then you won't need to check if configuration is null. You should do the same for the AddServal method as well.

Done.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 10 of 10 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @johnml1135)


src/Serval/src/Serval.Assessment/Configuration/IServalBuilderExtensions.cs line 18 at r2 (raw file):

        var assessmentOptions = new AssessmentOptions();
        builder.Configuration?.GetSection(AssessmentOptions.Key).Bind(assessmentOptions);

We don't need the null-conditional operator anymore.


src/Serval/src/Serval.Translation/Configuration/IServalBuilderExtensions.cs line 18 at r2 (raw file):

        var translationOptions = new TranslationOptions();
        builder.Configuration?.GetSection(TranslationOptions.Key).Bind(translationOptions);

We don't need the null-conditional operator anymore.

@johnml1135
Copy link
Collaborator Author

src/Serval/src/Serval.Translation/Configuration/IServalBuilderExtensions.cs line 18 at r2 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

We don't need the null-conditional operator anymore.

Fixed all.

@johnml1135
Copy link
Collaborator Author

src/Serval/src/Serval.Assessment/Configuration/IServalBuilderExtensions.cs line 18 at r2 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

We don't need the null-conditional operator anymore.

Done.

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)

@johnml1135 johnml1135 merged commit a68bc9c into main Nov 6, 2024
3 checks passed
@johnml1135 johnml1135 deleted the iconfiguration2 branch November 6, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants