Comments (2)
Hi Alex,
Yes, member expressions are used to get the argument names and compilation is necessary to get the values. Both initializing an expression and compiling it are expensive actually but you are right that the compilation being the bigger issue.
For initializing guarded arguments (Guard.Argument
overloads): I don't understand how I can use constant expressions for this as I don't know a way to get the value from a member expression without compiling it. Can you give me an example or point me to a resource or code where this is used? I'd love to implement this if it is possible.
For member guards: Compilation costs are fine here because I actually cache the compiled delegates, so the cost is one time only. The creation of the expression itself remains an issue since unfortunately, those lambdas are not cached.
Thank you for using the library, I'm glad you liked it.
from guard.
Closing this issue as it has been inactive for 43 days. Feel free to re-open if needed.
from guard.
Related Issues (20)
- Interop NotNullWhenAttribute leaks HOT 1
- Support for both directory and file path validation HOT 2
- How to return the Exception instead of throwing it HOT 3
- Problem with "InitContainsDuplicate" on .NET < 4.7.2 HOT 1
- Multiple checks with same custom message HOT 3
- How to Guard an ICollection member HOT 1
- CA1062 warning HOT 5
- Support validation/guard-clauses for collection items HOT 1
- Guard variants for nullable types HOT 2
- how to validata the string is a valid email address? HOT 1
- NotDefault limited to struct HOT 1
- Unacceptable performance HOT 3
- Add support for 'CallerArgumentExpression' attribute HOT 9
- Confirm parameter is one of list of Types HOT 1
- Binary Backward Compatibility HOT 2
- Document inclusivity of InRange HOT 2
- Similar fluent-style guard library for javascript
- Enhanced String char based guards. HOT 2
- 'NotNull' validation should be available for unconstrained generic types HOT 2
- Status on v2 of the library HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guard.