Table of Contents

ThrowIfContainsReservedKeyword Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Validator.cs

ThrowIfContainsReservedKeyword(string, IEnumerable<string>, string, string)

Validates and throws a ArgumentReservedKeywordException if the specified argument is found in the sequence of reservedKeywords.

public static void ThrowIfContainsReservedKeyword(string argument, IEnumerable<string> reservedKeywords, string message = null, string paramName = null)

Parameters

argument string

The keyword to compare with reservedKeywords.

reservedKeywords IEnumerable<string>

The reserved keywords to compare with argument.

message string

A message that describes the error.

paramName string

The name of the parameter that caused the exception.

Exceptions

ArgumentReservedKeywordException

The specified argument is contained within reservedKeywords.

ThrowIfContainsReservedKeyword(string, IEnumerable<string>, IEqualityComparer<string>, string, string)

Validates and throws a ArgumentReservedKeywordException if the specified argument is found in the sequence of reservedKeywords.

public static void ThrowIfContainsReservedKeyword(string argument, IEnumerable<string> reservedKeywords, IEqualityComparer<string> comparer, string message = null, string paramName = null)

Parameters

argument string

The keyword to compare with reservedKeywords.

reservedKeywords IEnumerable<string>

The reserved keywords to compare with argument.

comparer IEqualityComparer<string>

The IEqualityComparer<T> implementation to use when comparing reservedKeywords with argument.

message string

A message that describes the error.

paramName string

The name of the parameter that caused the exception.

Exceptions

ArgumentReservedKeywordException

The specified argument is contained within reservedKeywords.