-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip validation #80
Skip validation #80
Conversation
9a6ba43
to
b08fe55
Compare
@@ -14,6 +14,7 @@ public class FluentGraphValidator : IFluentGraphValidator | |||
private readonly ILogger<FluentGraphValidator> logger; | |||
private readonly IOptions<FluentGraphValidatorOptions> options; | |||
private readonly IServiceScope serviceScope; | |||
private readonly ConcurrentDictionary<string, bool> skipAttributes = new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignorePropertiesCache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FluentGraphValidator это синглтон или нет? Если нет, то давай сделаем static чтоли
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scoped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignoredPropertiesCache
, сорян)
@@ -166,6 +167,13 @@ or byte | |||
|
|||
foreach (var property in modelGraphValidationContext.Model.GetType().GetProperties()) | |||
{ | |||
var needSkipAttribute = skipAttributes.GetOrAdd($"{modelGraphValidationContext.Model.GetType()}_{property.Name}", _ => property.GetCustomAttributes(typeof(SkipGraphValidationAttribute), true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isSkippedProperty?
🎉 This PR is included in version 1.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.