C# Class Microsoft.Cci.Ast.MethodContract

A collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method.
Inheritance: Contract, IMethodContract
Afficher le fichier Open project: visualmutator/visualmutator

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
Dispatch ( ICodeAndContractVisitor visitor ) : void

Calls visitor.Visit(IMethodContract).

MakeCopyFor ( BlockStatement containingBlock ) : MethodContract

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

MethodContract ( ) : System.Collections.Generic

Allocates an empty method contract that indicates that the method body must be inlined.

MethodContract ( IEnumerable allocates, IEnumerable frees, IEnumerable modifiedVariables, IEnumerable postconditions, IEnumerable preconditions, IEnumerable reads, IEnumerable thrownExceptions, IEnumerable writes, bool isPure ) : System.Collections.Generic

Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.

MethodContract ( IEnumerable allocates, IEnumerable frees, IEnumerable modifiedVariables, IEnumerable postconditions, IEnumerable preconditions, IEnumerable reads, IEnumerable thrownExceptions, IEnumerable writes, bool isPure, IEnumerable variants ) : System.Collections.Generic

Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.

SetContainingBlock ( BlockStatement containingBlock ) : 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.

Méthodes protégées

Méthode Description
CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool

Checks for errors and return true if any are found.

MethodContract ( MethodContract template ) : System.Collections.Generic

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

Method Details

CheckForErrorsAndReturnTrueIfAnyAreFound() protected méthode

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

Dispatch() public méthode

Calls visitor.Visit(IMethodContract).
public Dispatch ( ICodeAndContractVisitor visitor ) : void
visitor ICodeAndContractVisitor
Résultat void

MakeCopyFor() public méthode

Makes a copy of this contract, changing the containing block to the given block.
public MakeCopyFor ( BlockStatement containingBlock ) : MethodContract
containingBlock BlockStatement
Résultat MethodContract

MethodContract() public méthode

Allocates an empty method contract that indicates that the method body must be inlined.
public MethodContract ( ) : System.Collections.Generic
Résultat System.Collections.Generic

MethodContract() public méthode

Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.
public MethodContract ( IEnumerable allocates, IEnumerable frees, IEnumerable modifiedVariables, IEnumerable postconditions, IEnumerable preconditions, IEnumerable reads, IEnumerable thrownExceptions, IEnumerable writes, bool isPure ) : System.Collections.Generic
allocates IEnumerable A possibly empty list of expressions that each represents a set of memory locations that are newly allocated by a call to the method.
frees IEnumerable A possibly empty list of expressions that each represents a set of memory locations that are freed by a call to the method.
modifiedVariables IEnumerable A possibly empty or null list of target expressions (variables) that are modified by the called method.
postconditions IEnumerable A possibly empty or null list of postconditions that are established by the called method.
preconditions IEnumerable A possibly empty list of preconditions that must be established by the calling method.
reads IEnumerable A possibly empty list of expressions that each represents a set of memory locations that may be read by the called method.
thrownExceptions IEnumerable A possibly empty or null list of exceptions that may be thrown (or passed on) by the called method.
writes IEnumerable A possibly empty list of expressions that each represents a set of memory locations that may be written to by the called method.
isPure bool True if the method has no observable side-effect on program state and hence this method is safe to use in a contract, which may or may not be executed, depending on how the program has been compiled.
Résultat System.Collections.Generic

MethodContract() public méthode

Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.
public MethodContract ( IEnumerable allocates, IEnumerable frees, IEnumerable modifiedVariables, IEnumerable postconditions, IEnumerable preconditions, IEnumerable reads, IEnumerable thrownExceptions, IEnumerable writes, bool isPure, IEnumerable variants ) : System.Collections.Generic
allocates IEnumerable A possibly empty list of expressions that each represents a set of memory locations that are newly allocated by a call to the method.
frees IEnumerable A possibly empty list of expressions that each represents a set of memory locations that are freed by a call to the method.
modifiedVariables IEnumerable A possibly empty or null list of target expressions (variables) that are modified by the called method.
postconditions IEnumerable A possibly empty or null list of postconditions that are established by the called method.
preconditions IEnumerable A possibly empty list of preconditions that must be established by the calling method.
reads IEnumerable A possibly empty list of expressions that each represents a set of memory locations that may be read by the called method.
thrownExceptions IEnumerable A possibly empty or null list of exceptions that may be thrown (or passed on) by the called method.
writes IEnumerable A possibly empty list of expressions that each represents a set of memory locations that may be written to by the called method.
isPure bool True if the method has no observable side-effect on program state and hence this method is safe to use in a contract, which may or may not be executed, depending on how the program has been compiled.
variants IEnumerable A possibly empty list of variants, each of which is decreased in each call from the method.
Résultat System.Collections.Generic

MethodContract() protected méthode

A copy constructor that allocates an instance that is the same as the given template.
protected MethodContract ( MethodContract template ) : System.Collections.Generic
template MethodContract The template to copy.
Résultat System.Collections.Generic

SetContainingBlock() public méthode

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 SetContainingBlock ( BlockStatement containingBlock ) : void
containingBlock BlockStatement
Résultat void