Share via


CodeContract Class

Definition

CodeContract is used for validate input parameters

public ref class CodeContract abstract sealed
public static class CodeContract
type CodeContract = class
Public Module CodeContract
Inheritance
CodeContract

Methods

RequiresArgumentNotEmpty(Guid, String)

Requires that Guid is not empty

RequiresArgumentNotEmptyOrWhitespace(String, String)

Requires that string is not empty or contains just whitespaces

RequiresArgumentNotNull<T>(T, String)

Requires that argument is not null

RequiresArgumentNotNullAndNotEmpty(String, String)

Requires that string is not null and not empty

RequiresArgumentNotNullAndNotWhiteSpace(String, String)

Requires that argument not null and not whitespace

Applies to