Export (0) Print
Expand All

System.Diagnostics.Contracts Namespace

The System.Diagnostics.Contracts namespace contains static classes for representing program contracts such as preconditions, postconditions, and invariants.

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

  Enumeration Description
Public enumeration Supported by Portable Class Library Supported in .NET for Windows Store apps ContractFailureKind Specifies the type of contract that failed.
Show:
© 2014 Microsoft