System.Predicate.Invoke(ValidationContext)

Here are the examples of the csharp api System.Predicate.Invoke(ValidationContext) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : RuleSet.cs
with MIT License
from Avanade

public async Task ValidateAsync(ValidationContext<TEnreplacedy> context)
        {
            // Check the condition before continuing to validate the underlying rules.
            if (!Predicate(context))
                return;

            // Validate each of the property rules.
            foreach (var rule in Rules)
            {
                await rule.ValidateAsync(context).ConfigureAwait(false);
            }
        }