2 writes to Length
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (2)
32Length = length; 43Length = MaxAllowableLength;
11 references to Length
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
MaxLengthAttributeAdapter.cs (2)
18_max = Attribute.Length.ToString(CultureInfo.InvariantCulture); 38Attribute.Length);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
MaxLengthAttributeAdapterTest.cs (1)
118stringLocalizer.Setup(s => s[errorKey, metadata.GetDisplayName(), attribute.Length]).Returns(localizedString);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
1341if (attribute is MaxLengthAttribute maxLengthAttribute && (!maxLengthValue.HasValue || maxLengthValue.Value > maxLengthAttribute.Length)) 1343maxLengthValue = maxLengthAttribute.Length;
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
119schema[targetKey] = maxLengthAttribute.Length;
System.ComponentModel.Annotations (5)
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (5)
87return MaxAllowableLength == Length || length <= Length; 97string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, Length); 105if (Length == 0 || Length < -1)