SettingsUnitHelperThrowIfNotPattern - метод

Throws an exception if the specified value does not match the required regex pattern.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
public static void ThrowIfNotPattern(
	[NotNullAttribute] string? value,
	Regex regex,
	string? paramName = null,
	string? message = null
)

Параметры

value  String
The string value to validate.
regex  Regex
The regular expression to match against.
paramName  String  (Optional)
The name of the parameter being validated (optional).
message  String  (Optional)
Custom error message (optional).

Исключения

ArgumentExceptionThrown when the value does not match the specified regex pattern.
ArgumentNullExceptionThrown when value or regex is null.

См. также