MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsContract­TemplatesOn­String­Max­Length­Contract­Violated
Open sandboxFocus

ContractTemplates.OnStringMaxLengthContractViolated Method

OnStringMaxLengthContractViolated(dynamic?, int, ContractContext)

Template used by the StringLengthAttribute contract when only the upper bound is specified.

Declaration
[Template]
public virtual void OnStringMaxLengthContractViolated(dynamic? value, int maximumLength, ContractContext context)
Parameters
Type Name Description
dynamic value
int maximumLength
ContractContext context