Skip to content

Commit

Permalink
refactor: rename to ignoredPropertiesCache
Browse files Browse the repository at this point in the history
  • Loading branch information
pogromistik committed Mar 4, 2024
1 parent 9f39aa4 commit 3b023dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sitko.FluentValidation/Graph/FluentGraphValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class FluentGraphValidator : IFluentGraphValidator
private readonly ILogger<FluentGraphValidator> logger;
private readonly IOptions<FluentGraphValidatorOptions> options;
private readonly IServiceScope serviceScope;
private static readonly ConcurrentDictionary<string, bool> IgnorePropertiesCache = new();
private static readonly ConcurrentDictionary<string, bool> IgnoredPropertiesCache = new();

public FluentGraphValidator(IServiceProvider serviceProvider, ILogger<FluentGraphValidator> logger,
IOptions<FluentGraphValidatorOptions> options)
Expand Down Expand Up @@ -167,7 +167,7 @@ or byte

foreach (var property in modelGraphValidationContext.Model.GetType().GetProperties())
{
var isSkippedProperty = IgnorePropertiesCache.GetOrAdd($"{modelGraphValidationContext.Model.GetType()}_{property.Name}", _ => property.GetCustomAttributes(typeof(SkipGraphValidationAttribute), true)
var isSkippedProperty = IgnoredPropertiesCache.GetOrAdd($"{modelGraphValidationContext.Model.GetType()}_{property.Name}", _ => property.GetCustomAttributes(typeof(SkipGraphValidationAttribute), true)
.Cast<SkipGraphValidationAttribute>()
.FirstOrDefault() != null);
if (isSkippedProperty)
Expand Down

0 comments on commit 3b023dc

Please sign in to comment.