ValidateEnumValueAttributeGetErrorMessage Method

Gets the error message to display if validation failed.

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public override string GetErrorMessage(
	CommandLineArgument argument,
	Object? value
)

Parameters

argument  CommandLineArgument
The argument that was validated.
value  Object
The argument value. If not , this must be an instance of CommandLineArgumentArgumentType.

Return Value

String
The error message.

Remarks

Use a custom LocalizedStringProvider class that overrides the LocalizedStringProviderValidateEnumValueFailed(String, Type, Object, Boolean) method to customize this message.

See Also