C# Class Microsoft.Cci.Ast.TypeContract

A collection of collections of objects that augment the signature of a type with additional information that describe invariants, model variables and functions, as well as axioms.
Inheritance: Contract, ITypeContract
Mostra file Open project: visualmutator/visualmutator

Private Properties

Property Type Description
TypeContract System.Collections.Generic

Public Methods

Method Description
Dispatch ( ICodeAndContractVisitor visitor ) : void

Calls visitor.Visit(ITypeContract).

MakeCopyFor ( TypeDeclaration containingType ) : TypeContract

Makes a copy of this contract, changing the containing block to the given block.

SetContainingType ( TypeDeclaration containingType ) : void

Completes the two stage construction of this object. This allows bottom up parsers to construct an Expression before constructing the containing Expression. This method should be called once only and must be called before this object is made available to client code. The construction code itself should also take care not to call any other methods or property/event accessors on the object until after this method has been called.

TypeContract ( IEnumerable contractFields, IEnumerable contractMethods, IEnumerable invariants ) : System.Collections.Generic

Allocates a collection of collections of objects that augment the signature of a type with additional information that describe invariants, model variables and functions, as well as axioms.

Protected Methods

Method Description
CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool

Checks for errors and return true if any are found.

Private Methods

Method Description
TypeContract ( TypeContract template ) : System.Collections.Generic

A copy constructor that allocates an instance that is the same as the given template.

Method Details

CheckForErrorsAndReturnTrueIfAnyAreFound() protected method

Checks for errors and return true if any are found.
protected CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool
return bool

Dispatch() public method

Calls visitor.Visit(ITypeContract).
public Dispatch ( ICodeAndContractVisitor visitor ) : void
visitor ICodeAndContractVisitor
return void

MakeCopyFor() public method

Makes a copy of this contract, changing the containing block to the given block.
public MakeCopyFor ( TypeDeclaration containingType ) : TypeContract
containingType TypeDeclaration
return TypeContract

SetContainingType() public method

Completes the two stage construction of this object. This allows bottom up parsers to construct an Expression before constructing the containing Expression. This method should be called once only and must be called before this object is made available to client code. The construction code itself should also take care not to call any other methods or property/event accessors on the object until after this method has been called.
public SetContainingType ( TypeDeclaration containingType ) : void
containingType TypeDeclaration
return void

TypeContract() public method

Allocates a collection of collections of objects that augment the signature of a type with additional information that describe invariants, model variables and functions, as well as axioms.
public TypeContract ( IEnumerable contractFields, IEnumerable contractMethods, IEnumerable invariants ) : System.Collections.Generic
contractFields IEnumerable A possibly empty list of contract fields. Contract fields can only be used inside contracts and are not available at runtime.
contractMethods IEnumerable A possibly empty list of contract methods. Contract methods have no bodies and can only be used inside contracts. The meaning of a contract /// method is specified by the axioms (assumed invariants) of the associated type. Contract methods are not available at runtime.
invariants IEnumerable A possibly empty list of type invariants. Axioms are a special type of invariant.
return System.Collections.Generic