Giter Club home page Giter Club logo

Comments (9)

ardalis avatar ardalis commented on May 12, 2024 1

yes, if someone wants to implement support for it, I'd look at the PR. Just reference this issue number in the description. Thanks, @wgnf

from guardclauses.

ardalis avatar ardalis commented on May 12, 2024 1

Hmm... yeah, that's fair. I think maybe I missed it due to its naming. Ok, let's just say this is done, then. 😃

from guardclauses.

fiseni avatar fiseni commented on May 12, 2024

This is nice. Any reason you want to limit this only for "struct"?

from guardclauses.

dsbert avatar dsbert commented on May 12, 2024

Be aware that this can lead to performance issues if abused.

safakgur/guard#13

from guardclauses.

ardalis avatar ardalis commented on May 12, 2024

Let's implement this and see if there are any issues.

from guardclauses.

mohaanwrites avatar mohaanwrites commented on May 12, 2024

If someone wants to deal with string properties with custom validations, this will not allow. Otherwise, I've added the required tests. Let me know. @ardalis

from guardclauses.

wgnf avatar wgnf commented on May 12, 2024

@ardalis do you still want this to be implemented? if so, i'd love to have a go at this :)

from guardclauses.

wgnf avatar wgnf commented on May 12, 2024

Just scrolling through code to see how things are done i stumbled upon this one:

https://github.com/ardalis/GuardClauses/blob/main/src/GuardClauses/GuardClauseExtensions.cs#L581-L589

Guard.Against.InvalidInput seems to already be the "Expression Guard" that you want to implement in this issue 🤔

from guardclauses.

wgnf avatar wgnf commented on May 12, 2024

The only thing that is different here is that you mention a IGuardClause<T> with a Value in that (new) interface, which I'm unable to find.

Or is that the new feature you wanted to implement and I just didn't get the hint? :D @ardalis

from guardclauses.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.