You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Gets or sets the validation context used for validating objects that implement <see cref="IValidatableObject"/> or have <see cref="ValidationAttribute"/>.
21
19
/// This context provides access to service provider and other validation metadata.
@@ -63,55 +61,33 @@ public sealed class ValidateContext
63
61
/// This is used to prevent stack overflows from circular references.
64
62
/// </summary>
65
63
publicintCurrentDepth{get;set;}
66
-
64
+
67
65
/// <summary>
68
66
/// Gets or sets the JSON serializer options to use for property name formatting.
69
67
/// When available, property names in validation errors will be formatted according to the
70
68
/// PropertyNamingPolicy and JsonPropertyName attributes.
71
69
/// </summary>
72
-
publicJsonSerializerOptions?SerializerOptions
73
-
{
70
+
publicJsonSerializerOptions?SerializerOptions
71
+
{
74
72
get=>_serializerOptions;
75
-
set
76
-
{
77
-
_serializerOptions=value;
78
-
// Invalidate cache when SerializerOptions changes
79
-
_namingPolicyCached=false;
80
-
_cachedNamingPolicy=null;
81
-
}
73
+
set=>_serializerOptions=value;
82
74
}
83
75
privateJsonSerializerOptions?_serializerOptions;
84
76
85
-
/// <summary>
86
-
/// Gets the cached naming policy from SerializerOptions to avoid repeated property access.
0 commit comments