12 references to GetDisplayName
Microsoft.Extensions.Http.Resilience (12)
src\Shared\Data.Validation\LengthAttribute.cs (6)
98
throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.
GetDisplayName
()})");
103
throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.
GetDisplayName
()})");
140
throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.
GetDisplayName
()})");
175
return new ValidationResult(FormatErrorMessage(validationContext.
GetDisplayName
()), validationContext.GetMemberName());
181
? $"The field {validationContext.
GetDisplayName
()} length must be in the {exclusiveString}range [{MinimumLength}..{MaximumLength}]."
182
: $"The field {validationContext.
GetDisplayName
()} length must be greater {orEqualString}than {MinimumLength}.";
src\Shared\Data.Validation\TimeSpanAttribute.cs (6)
121
throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.
GetDisplayName
()})");
134
return new ValidationResult($"The field {validationContext.
GetDisplayName
()} must be > to {min}.", validationContext.GetMemberName());
139
return new ValidationResult($"The field {validationContext.
GetDisplayName
()} must be >= to {min}.", validationContext.GetMemberName());
146
return new ValidationResult($"The field {validationContext.
GetDisplayName
()} must be < to {max}.", validationContext.GetMemberName());
151
return new ValidationResult($"The field {validationContext.
GetDisplayName
()} must be <= to {max}.", validationContext.GetMemberName());
158
throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.
GetDisplayName
()})");