Sdílet prostřednictvím


CodeContract Třída

Definice

CodeContract se používá pro ověření vstupních parametrů.

public ref class CodeContract abstract sealed
public static class CodeContract
type CodeContract = class
Public Module CodeContract
Dědičnost
CodeContract

Metody

RequiresArgumentNotEmpty(Guid, String)

Vyžaduje, aby identifikátor GUID nebyl prázdný.

RequiresArgumentNotEmptyOrWhitespace(String, String)

Vyžaduje, aby řetězec nebyl prázdný nebo obsahoval pouze prázdné znaky.

RequiresArgumentNotNull<T>(T, String)

Vyžaduje, aby argument neměl hodnotu null.

RequiresArgumentNotNullAndNotEmpty(String, String)

Vyžaduje, aby řetězec neměl hodnotu null a nebyl prázdný.

RequiresArgumentNotNullAndNotWhiteSpace(String, String)

Vyžaduje, aby argument nebyl null a ne prázdné znaky.

Platí pro