Skip to content

Prototype collection IfAny()#25

Draft
amantinband wants to merge 2 commits intomainfrom
users/ammantin/prototype-if-any
Draft

Prototype collection IfAny()#25
amantinband wants to merge 2 commits intomainfrom
users/ammantin/prototype-if-any

Conversation

@amantinband
Copy link
Copy Markdown
Owner

No description provided.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #25 (4387d35) into main (cf9adce) will decrease coverage by 2.26%.
The diff coverage is 5.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   93.74%   91.48%   -2.27%     
==========================================
  Files          28       29       +1     
  Lines         735      810      +75     
==========================================
+ Hits          689      741      +52     
- Misses         46       69      +23     
Impacted Files Coverage Δ
src/Program.cs 0.00% <0.00%> (ø)
...bleExtensions/ValidatableExtensions.Collections.cs 87.50% <0.00%> (-12.50%) ⬇️
src/Validators/Validator.Collections.cs 76.27% <0.00%> (-13.73%) ⬇️
src/Common/Validatable.cs 84.21% <100.00%> (ø)
src/Validators/Validator.Strings.cs 83.33% <0.00%> (ø)
...datableExtensions/ValidatableExtensions.Strings.cs 100.00% <0.00%> (ø)
...tensions/ValidatableExtensions.StringProperties.cs 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf9adce...4387d35. Read the comment docs.

/// The default exception thrown is an <see cref="ArgumentException"/>.
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static IValidatable<IEnumerable<TItem>> IfAny<TItem>(this IValidatable<IEnumerable<TItem>> validatable, Func<TItem, bool> predicate, [CallerArgumentExpression("predicate")] string? predicateName = null)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This definition:

    this IValidatable<IEnumerable<TItem>> validatable

will box the struct.. Any way around this 🤔?

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