mscorlib(4.0.0.0) API with additions
System.Diagnostics.Contracts Namespace Reference

Classes

class  Contract
 Contains static methods for representing program contracts such as preconditions, postconditions, and object invariants. More...
 
class  ContractAbbreviatorAttribute
 Defines abbreviations that you can use in place of the full contract syntax. More...
 
class  ContractArgumentValidatorAttribute
 Enables the factoring of legacy if-then-throw code into separate methods for reuse, and provides full control over thrown exceptions and arguments. More...
 
class  ContractClassAttribute
 Specifies that a separate type contains the code contracts for this type. More...
 
class  ContractClassForAttribute
 Specifies that a class is a contract for a type. More...
 
class  ContractFailedEventArgs
 Provides methods and data for the E:System.Diagnostics.Contracts.Contract.ContractFailed event. More...
 
class  ContractInvariantMethodAttribute
 Marks a method as being the invariant method for a class. More...
 
class  ContractOptionAttribute
 Enables you to set contract and tool options at assembly, type, or method granularity. More...
 
class  ContractPublicPropertyNameAttribute
 Specifies that a field can be used in method contracts when the field has less visibility than the method. More...
 
class  ContractReferenceAssemblyAttribute
 Specifies that an assembly is a reference assembly that contains contracts. More...
 
class  ContractRuntimeIgnoredAttribute
 Identifies a member that has no run-time behavior. More...
 
class  ContractVerificationAttribute
 Instructs analysis tools to assume the correctness of an assembly, type, or member without performing static verification. More...
 
class  PureAttribute
 Indicates that a type or method is pure, that is, it does not make any visible state changes. More...
 

Enumerations

enum  ContractFailureKind {
  ContractFailureKind.Precondition, ContractFailureKind.Postcondition, ContractFailureKind.PostconditionOnException, ContractFailureKind.Invariant,
  ContractFailureKind.Assert, ContractFailureKind.Assume
}
 Specifies the type of contract that failed. More...
 

Enumeration Type Documentation

◆ ContractFailureKind

Specifies the type of contract that failed.

Enumerator
Precondition 

A Overload:System.Diagnostics.Contracts.Contract.Requires contract failed.

Postcondition 

An Overload:System.Diagnostics.Contracts.Contract.Ensures contract failed.

PostconditionOnException 

An Overload:System.Diagnostics.Contracts.Contract.EnsuresOnThrow contract failed.

Invariant 

An Overload:System.Diagnostics.Contracts.Contract.Invariant contract failed.

Assert 

An Overload:System.Diagnostics.Contracts.Contract.Assert contract failed.

Assume 

An Overload:System.Diagnostics.Contracts.Contract.Assume contract failed.

Definition at line 5 of file ContractFailureKind.cs.