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

ParameterState: Improve hot swappable IEqualityComparer system #8739

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

ScarletKuro
Copy link
Member

@ScarletKuro ScarletKuro commented Apr 18, 2024

Description

Solves problem described here: #8661 (comment)
Adds new overload:

RegisterParameterBuilder<T> WithComparer<TFrom>(Func<IEqualityComparer<TFrom>> comparerFromFunc, Func<IEqualityComparer<TFrom>, IEqualityComparer<T>> comparerToFunc, [CallerArgumentExpression(nameof(comparerFromFunc))] string? comparerParameterName = null)

Example usage:

.WithComparer(() => Comparer, x => new CollectionComparer<T>(x));

How Has This Been Tested?

New unit test.

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added enhancement New feature or request PR: needs review labels Apr 18, 2024
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Attention: Patch coverage is 91.17647% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 90.11%. Comparing base (28bc599) to head (0f957e1).
Report is 73 commits behind head on dev.

Files Patch % Lines
...ate/Comparer/ParameterEqualityComparerSwappable.cs 71.42% 1 Missing and 1 partial ⚠️
...rer/ParameterEqualityComparerTransformSwappable.cs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8739      +/-   ##
==========================================
+ Coverage   89.82%   90.11%   +0.28%     
==========================================
  Files         412      419       +7     
  Lines       11878    12178     +300     
  Branches     2364     2395      +31     
==========================================
+ Hits        10670    10974     +304     
+ Misses        681      665      -16     
- Partials      527      539      +12     

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

@henon
Copy link
Collaborator

henon commented Apr 18, 2024

Ohh, very nice.

@ScarletKuro ScarletKuro merged commit 2042ab7 into MudBlazor:dev Apr 18, 2024
4 checks passed
@ScarletKuro ScarletKuro deleted the state_v6 branch April 18, 2024 18:09
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants