C# Class Microsoft.Cci.Ast.MethodContractItem

A condition that must be true at the start or end of a method
Inheritance: CheckableSourceItem
Mostra file Open project: visualmutator/visualmutator Class Usage Examples

Public Methods

Method Description
SetContainingExpression ( Expression containingExpression ) : 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.

Protected Methods

Method Description
CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool

Performs any error checks still needed and returns true if any errors were found in the statement or a constituent part of the statement.

MethodContractItem ( BlockStatement containingBlock, MethodContractItem template ) : System.Collections.Generic

A copy constructor that allocates an instance that is the same as the given template, except for its containing block.

MethodContractItem ( Expression condition, ISourceLocation sourceLocation ) : System.Collections.Generic

Allocates a condition that must be true at the start or end of a method

Method Details

CheckForErrorsAndReturnTrueIfAnyAreFound() protected method

Performs any error checks still needed and returns true if any errors were found in the statement or a constituent part of the statement.
protected CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool
return bool

MethodContractItem() protected method

A copy constructor that allocates an instance that is the same as the given template, except for its containing block.
protected MethodContractItem ( BlockStatement containingBlock, MethodContractItem template ) : System.Collections.Generic
containingBlock BlockStatement The containing block of the copied condition. This should be different from the containing block of the template precondition.
template MethodContractItem The statement to copy.
return System.Collections.Generic

MethodContractItem() protected method

Allocates a condition that must be true at the start or end of a method
protected MethodContractItem ( Expression condition, ISourceLocation sourceLocation ) : System.Collections.Generic
condition Expression The condition that must be true at the start or end of the method that is associated with this MethodContractItem instance.
sourceLocation ISourceLocation The source location corresponding to the newly allocated source item.
return System.Collections.Generic

SetContainingExpression() 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 SetContainingExpression ( Expression containingExpression ) : void
containingExpression Expression
return void