Property | Type | Description |
---|
Method | Description | |
---|---|---|
Dispatch ( ICodeAndContractVisitor visitor ) : void |
Calls visitor.Visit(ITypeInvariant).
|
|
Dispatch ( SourceVisitor visitor ) : void |
Calls visitor.Visit(TypeInvariant).
|
|
MakeCopyFor ( BlockStatement containingBlock ) : TypeInvariant |
Makes a copy of this type invariant, changing the containing block to the given block.
|
|
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.
|
|
TypeInvariant ( Microsoft.Cci.Ast.NameDeclaration name, Expression condition, bool isAxiom, ISourceLocation sourceLocation ) : System.Collections.Generic |
Allocates a condition that must be true at the start of a method, possibly bundled with an exception that will be thrown if the condition does not hold.
|
Method | Description | |
---|---|---|
TypeInvariant ( BlockStatement containingBlock, TypeInvariant template ) : System.Collections.Generic |
A copy constructor that allocates an instance that is the same as the given template, except for its containing block.
|
public Dispatch ( ICodeAndContractVisitor visitor ) : void | ||
visitor | ICodeAndContractVisitor | |
return | void |
public Dispatch ( SourceVisitor visitor ) : void | ||
visitor | SourceVisitor | |
return | void |
public MakeCopyFor ( BlockStatement containingBlock ) : TypeInvariant | ||
containingBlock | BlockStatement | |
return | TypeInvariant |
public SetContainingExpression ( Expression containingExpression ) : void | ||
containingExpression | Expression | |
return | void |
protected TypeInvariant ( BlockStatement containingBlock, TypeInvariant template ) : System.Collections.Generic | ||
containingBlock | BlockStatement | The containing block of the copied type invariant. This should be different from the containing block of the template. |
template | TypeInvariant | The statement to copy. |
return | System.Collections.Generic |
public TypeInvariant ( Microsoft.Cci.Ast.NameDeclaration name, Expression condition, bool isAxiom, ISourceLocation sourceLocation ) : System.Collections.Generic | ||
name | Microsoft.Cci.Ast.NameDeclaration | The name of the axiom. Used in error diagnostics. May be null. |
condition | Expression | The condition that must be true at the start of the method that is associated with this Precondition instance. |
isAxiom | bool | An axiom is a type invariant whose truth is assumed rather than derived. Commonly used to make statements about the meaning of contract methods. |
sourceLocation | ISourceLocation | The source location corresponding to the newly allocated source item. |
return | System.Collections.Generic |