cohen990 / EasyConfig.Net.Core

A library for importing settings from json, environment and command line with a focus on providing clear output and clear information to the user
Apache License 2.0
1 stars 1 forks source link

Add support for RequiredIf #5

Open cohen990 opened 7 years ago

cohen990 commented 7 years ago

A [RequiredIf(<condition>)] attribute

Condition could be passed in as a lambda

Idea is that you say

Need to think about order of condition evaluation?

skolima commented 7 years ago

Attribute values have to be primitive values, so I'm guessing the best you could do is a nameof(OtherProperty) operator here that still resolves to a compile-time constant primitive value. This could be useful.